An Archiver is an abstraction for packing and unpacking archives.
When packing, the added source files and globs are included in the
archive, relative from the source root.
Copy contents that were extracted (or mounted) into the source directory
over to the target directory. If a prefix is provided, copy the contents
of that sub-directory instead. Used by formats (like dmg) that can’t
unpack entries from a stream.
Returns true if writing to target would escape root by traversing a
symlink – for example a symlink entry planted earlier in the same archive
that points outside the output directory (CWE-22 / CWE-59). Every already
existing ancestor of target beneath root is checked, since
create_dir_all and file writes would otherwise follow such a link.
Return a list of all supported compression/codec file extensions,
without the format-specific extensions like tar or zip,
regardless of which Cargo features are enabled.
Return a unique temporary directory to mount or expand an archive
into. Each unpack requires its own directory, otherwise unpacks
running in parallel would collide with each other (mounts would
detach each other, and pkgutil refuses to expand into an existing
directory), so namespace by process and an incrementing counter.
Strip the prefix from a path, supporting * wildcards in the prefix.
A * matches any number of characters within a single component, so
* matches a whole component, while partial patterns like name-*
match components starting with name-. Wildcards never match across
component separators.