Archive.Entry (Archive v0.4.0)
Archive.Entry
represents a single item in an archive.
Most functions in this module will only work within the context of the aupplied mapping function given to Archive.read/3
. This is because these functions require a reference to the archive while streaming and while the entry is the current item in the stream.
Summary
Functions
Creates a new Archive.Entry
struct. This is done implicitly during Archive.read/3
.
Loads the entry data into the archive. The archive is automatically passed to the current entry during Archive.read/3
, Archive.from_memory_streaming/3
, and Archive.from_file_streaming/3
.
Types
@type t() :: %Archive.Entry{ data: binary() | nil, path: String.t(), stat: File.Stat.t() }
Functions
extract(entry, stream, opts \\ [])
new(fields \\ [])
Creates a new Archive.Entry
struct. This is done implicitly during Archive.read/3
.
new!(fields \\ [])
read_data(e, arg2)
Loads the entry data into the archive. The archive is automatically passed to the current entry during Archive.read/3
, Archive.from_memory_streaming/3
, and Archive.from_file_streaming/3
.