exfile v0.3.6 Exfile.File View Source

Represents a file stored on a Backend.

Link to this section Summary

Functions

Deletes a file

Checks if the file given actually exists in the backend or not

Opens a file

Returns the size, in bytes, of an Exfile.File

Returns the URI of this file

Link to this section Types

Link to this type t() View Source
t() :: %Exfile.File{backend: map, backend_meta: map, id: file_id, meta: map}

Link to this section Functions

Link to this function delete(file) View Source
delete(t) :: :ok | {:error, :file.posix}

Deletes a file.

Link to this function exists?(file) View Source
exists?(t) :: boolean

Checks if the file given actually exists in the backend or not.

Link to this function open(file) View Source
open(t) ::
  {:ok, %Exfile.LocalFile{io: term, meta: term, path: term}} |
  {:error, :file.posix}

Opens a file.

Link to this function size(file) View Source
size(t) :: {:ok, pos_integer} | {:error, :file.posix}

Returns the size, in bytes, of an Exfile.File.

Returns the URI of this file.