Storehouse.Archive.Entry (Storehouse v0.2.0)

Copy Markdown View Source

A file of an archive, as a format (Storehouse.Archive.Format) is given it:

  • :name - its path in the archive, checked safe.
  • :size - its size in bytes, or nil when it is not known before it is read (a stream, a function's).
  • :content_type - the store's, else its name's.
  • :compress - whether to compress it (Storehouse.Archive's :compression).
  • :data - a function of nothing that gives its bytes, an enumerable of iodata, read as it is taken.

Summary

Types

t()

@type t() :: %Storehouse.Archive.Entry{
  compress: boolean(),
  content_type: String.t(),
  data: (-> Enumerable.t()),
  name: String.t(),
  size: non_neg_integer() | nil
}