# README
This code provides helper functions for dealing with archive files.
# Functions
ApplyLayer parses a diff in the standard layer format from `layer`, and applies it to the directory `dest`.
ApplyUncompressedLayer parses a diff in the standard layer format from `layer`, and applies it to the directory `dest`.
CanonicalTarNameForPath returns platform-specific filepath to canonical posix-style path for tar archival.
Changes walks the path rw and determines changes for the files in the path, with respect to the parent layers.
ChangesDirs compares two directories and generates an array of Change objects describing the changes.
ChangesSize calculates the size in bytes of the provided changes, based on newDir.
CompressStream compresses the dest with specified compression algorithm.
CopyFileWithTarAndChown returns a function which copies a single file from outside of any container into our working container, mapping permissions using the container's ID maps, possibly overridden using the passed-in chownOpts.
CopyInfoDestinationPath stats the given path to create a CopyInfo struct representing that resource for the destination of an archive copy operation.
CopyInfoSourcePath stats the given path to create a CopyInfo struct representing that resource for the source of an archive copy operation.
CopyResource performs an archive copy from the given source path to the given destination path.
CopyTo handles extracting the given content whose entries should be sourced from srcInfo to dstPath.
CopyWithTarAndChown returns a function which copies a directory tree from outside of any container into our working container, mapping permissions using the container's ID maps, possibly overridden using the passed-in chownOpts.
DecompressStream decompresses the archive and returns a ReaderCloser with the decompressed archive.
DetectCompression detects the compression algorithm of the source.
ExportChanges produces an Archive from the provided changes, relative to dir.
FileInfoHeader creates a populated Header from fi.
Generate generates a new archive from the content provided as input.
No description provided by the author
GetOverlayXattrName returns the xattr used by the overlay driver with the given name.
GetRebaseName normalizes and compares path and resolvedPath, return completed resolved path and rebased file name.
No description provided by the author
IsArchive checks for the magic bytes of a tar or any supported compression algorithm.
IsArchivePath checks if the (possibly compressed) file at the given path starts with a tar file header.
NewArchiver returns a new Archiver.
NewArchiverWithChown returns a new Archiver which uses Untar and the provided ID mapping configuration on both ends.
NewDefaultArchiver returns a new Archiver without any IDMappings.
NewTempArchive reads the content of src into a temporary file, and returns the contents of that file as an archive.
OverlayChanges walks the path rw and determines changes for the files in the path, with respect to the parent layers.
PrepareArchiveCopy prepares the given srcContent archive, which should contain the archived resource described by srcInfo, to the destination described by dstInfo.
PreserveTrailingDotOrSeparator returns the given cleaned path (after processing using any utility functions from the path or filepath stdlib packages) and appends a trailing `/.` or `/` if its corresponding original path (from before being processed by utility functions from the path or filepath stdlib packages) ends with a trailing `/.` or `/`.
No description provided by the author
RebaseArchiveEntries rewrites the given srcContent archive replacing an occurrence of oldBase with newBase at the beginning of entry names.
ReplaceFileTarWrapper converts inputTarStream to a new tar stream.
ResolveHostSourcePath decides real path need to be copied with parameters such as whether to follow symbol link or not, if followLink is true, resolvedPath will return link target of any symbol link file, else it will only resolve symlink of directory but return symbol link file itself without resolving.
SplitPathDirEntry splits the given path between its directory name and its basename by first cleaning the path but preserves a trailing "." if the original path specified the current directory.
Tar creates an archive from the directory at `path`, and returns it as a stream of bytes.
TarPath returns a function which creates an archive of a specified location in the container's filesystem, mapping permissions using the container's ID maps.
TarResource archives the resource described by the given CopyInfo to a Tar archive.
TarResourceRebase is like TarResource but renames the first path element of items in the resulting tar archive to match the given rebaseName if not "".
TarWithOptions creates an archive from the directory at `path`, only including files whose relative paths are included in `options.IncludeFiles` (if non-nil) or not in `options.ExcludePatterns`.
Unpack unpacks the decompressedArchive to dest with options.
UnpackLayer unpack `layer` to a `dest`.
Untar reads a stream of bytes from `archive`, parses it as a tar archive, and unpacks it into the directory at `dest`.
UntarPath is a convenience function which looks for an archive at filesystem path `src`, and unpacks it at `dst`.
UntarPathAndChown returns a function which extracts an archive in a specified location into our working container, mapping permissions using the container's ID maps, possibly overridden using the passed-in chownOpts.
UntarUncompressed reads a stream of bytes from `archive`, parses it as a tar archive, and unpacks it into the directory at `dest`.
No description provided by the author
# Constants
AUFSWhiteoutFormat is the default format for whiteouts.
Bzip2 is bzip2 compression algorithm.
ChangeAdd represents the add operation.
ChangeDelete represents the delete operation.
ChangeModify represents the modify operation.
Gzip is gzip compression algorithm.
HeaderSize is the size in bytes of a tar header.
OverlayWhiteoutFormat formats whiteout according to the overlay standard.
No description provided by the author
Uncompressed represents the uncompressed.
WhiteoutLinkDir is a directory AUFS uses for storing hardlink links to other layers.
WhiteoutMetaPrefix prefix means whiteout has a special meaning and is not for removing an actual file.
WhiteoutOpaqueDir file means directory has been made opaque - meaning readdir calls to this directory do not follow to lower layers.
WhiteoutPrefix prefix means file is a whiteout.
Xz is xz compression algorithm.
Zstd is zstd compression algorithm.
# Variables
Errors used or returned by this file.
Errors used or returned by this file.
Errors used or returned by this file.
Errors used or returned by this file.
# Structs
Archiver allows the reuse of most utility functions of this package with a pluggable Untar function.
Change represents a change, it wraps the change type and path.
CopyInfo holds basic info about the source or destination path of a copy operation.
FileInfo describes the information of a file.
No description provided by the author
TempArchive is a temporary archive.
# Interfaces
No description provided by the author
No description provided by the author
# Type aliases
ChangeType represents the change type.
No description provided by the author
TarModifierFunc is a function that can be passed to ReplaceFileTarWrapper to modify the contents or header of an entry in the archive.
No description provided by the author