View Source IVCU.Converter behaviour (IVCU v0.1.1)

Interface module for file convertation.

Warning

Usually you don't need to implement converter yourself as there already exists IVCU.Converter.CMD helper. That's the reason this module is marked as "internal".

Link to this section Summary

Callbacks

Remove a file produced by the converter.

Trigger the convert action.

Link to this section Callbacks

Specs

clean!(IVCU.File.t()) :: :ok

Remove a file produced by the converter.

This action is triggered after storage performed IVCU.Storage.put/1 call.

Link to this callback

convert(t, version, new_filename)

View Source

Specs

convert(IVCU.File.t(), version, new_filename) ::
  {:ok, IVCU.File.t()} | {:error, term()}
when version: atom(), new_filename: String.t()

Trigger the convert action.

Note

When version is :original the command should be treated as a special case where the file stays unchanged.