std/archive
tar archives: Bytes.untarred reads what the tar programs in use write - POSIX ustar, pax (POSIX.1-2001) and GNU
tar - and List.tarred writes ustar, with a pax header in front of an entry whose path or link does not fit ustar's
fields. A package of the registry is a tar inside gzip (std/compression, docs/design/RELEASE.md section 7.2), and
so is a release of the toolchain.
An entry is a regular file, a directory, a symbolic link or a hard link (TarKind), with the permission bits and the
time of modification the archive gives it; a device and a pipe are refused. A path is kept as the archive writes it,
../x and /etc/x included: writing entries out is List.extract of std/archive/extract, which refuses every
entry that would land outside of its directory.
The operations are members of the lists they work on, written where they are imported from: a member another package
names is found in the module of the package that is imported, so use List.tarred, Buffer.untarred from "std/archive"
needs them here.
Modules
std/archive/extractThe entries of an archive written out below a directory: [List.extract], which refuses every entry that would land outside of it.std/archive/libtararchives: [Bytes.untarred] reads what thetarprograms in use write - POSIX ustar, pax (POSIX.1-2001) and GNU tar - and [List.tarred] writes ustar, with a pax header in front of an entry whose path or link does not fit ustar's fields.
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. - extend
BytesThe operation on the bytes of an archive. - extend
ExtractError with From<IoError>A failure of the file system, as the failure of the extraction it stopped. - extend
List<TarEntry>The write-out of a list of entries, written where it is imported from (see the top of this file). - extend
List<TarEntry>The operations on a list of entries, written where they are imported from (see the top of this file). - type
TarEntryOne entry of an archive: its path, with/between the directories and without one at the end, its bytes, what it is, its permission bits the way POSIX writes them (0b111_101_101is0755, a program) and the time it was last written, in seconds since 1970. - type
TarKindWhat an entry of an archive is.