exfile v0.1.3 Exfile.File

Represents a file stored on a Backend.

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

Types

file :: %Exfile.File{backend: term, backend_meta: term, id: term, meta: term}

Functions

delete(file)

Specs

delete(file) :: :ok | {:error, :file.posix}

Deletes a file.

exists?(file)

Specs

exists?(file) :: boolean

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

open(file)

Specs

open(file) ::
  {:ok, %Exfile.LocalFile{io: term, meta: term, path: term}} |
  {:error, :file.posix}

Opens a file.

size(file)

Specs

size(file) ::
  {:ok, pos_integer} |
  {:error, :file.posix}

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