exfile v0.3.1 Exfile.LocalFile
Represents a file on the local filesystem.
Summary
Functions
Copies the LocalFile to a new file-based LocalFile
Opens a LocalFile into an IO pid
Returns the size (in bytes) of the file
Types
Functions
Copies the LocalFile to a new file-based LocalFile.
Once the calling pid dies, the file will be automatically removed from the filesystem (see Exfile.Tempfile for more details).
Specs
open(t) ::
{:ok, :file.io_device} |
{:error, :file.posix} |
no_return
Opens a LocalFile into an IO pid.
If the LocalFile is already IO-based, the IO will be rewound to the beginning of the file.
Specs
size(t) :: {:ok, integer} | {:error, :file.posix}
Returns the size (in bytes) of the file.