std/archive
tar archives (POSIX ustar): tarred writes the entries as an archive that depends on nothing but the entries, and
untarred reads one back. A package of the registry is a tar inside gzip (std/compression,
docs/design/RELEASE.md section 7.2).
Only regular files are written and read: a directory entry is skipped, and a link, a device or an extended header is
refused, because a package has no use for one and a link is how an archive writes outside of where it is unpacked.
A path is kept as the archive says it; whoever writes the files out checks it (no .., not absolute).
Modules
std/archive/libtararchives (POSIX ustar): [tarred] writes the entries as an archive that depends on nothing but the entries, and [untarred] reads one back.
Everything
- type
ArchiveErrorA path an archive cannot hold, or an archive that breaks the format: what, and the byte where it was found. - extend
ArchiveError with From<ReadError>A read ofstd/binarythat failed on the bytes of an archive, with its own words and offset. - type
TarEntryOne file of an archive: its path, with/between the directories, and its bytes. - fn
tarredThe entries as a ustar archive, sorted by path, with nothing of the machine in it: every mode0644, every time 0, no owner, no group. - fn
untarredThe regular files of an archive, in the order it holds them.