A single tar entry: a regular file or a directory.
The same struct is produced by Debkit.Tar.read/1 and accepted by
Debkit.Tar.write/1, so an archive round-trips through it. Build entries with
the Debkit.Tar.file/3 and Debkit.Tar.dir/2 constructors, or directly:
%Debkit.Tar.Entry{name: "./control", contents: "Package: hello\n"}Fields
:name— the entry path, stored verbatim (keep a leading./and, for a directory, the trailing/). Required.:contents— the file body; always""for a directory.:mode— the permission bits.nilmeans "default for the type" —0o644for a file,0o755for a directory — resolved byDebkit.Tar.write/1.:type—:fileor:dir.
Summary
Types
@type t() :: %Debkit.Tar.Entry{ contents: binary(), mode: non_neg_integer() | nil, name: String.t(), type: type() }
@type type() :: :file | :dir
A tar entry's type.