package
1.10.16
Repository: https://github.com/hyperhq/hypercli.git
Documentation: pkg.go.dev

# 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.
CopyFileWithTar emulates the behavior of the 'cp' command-line for a single file.
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.
CopyWithTar creates a tar archive of filesystem path `src`, and unpacks it at filesystem path `dst`.
DecompressStream decompress 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.
Generate generates a new archive from the content provided as input.
GetRebaseName normalizes and compares path and resolvedPath, return completed resolved path and rebased file name.
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.
NewTempArchive reads the content of src into a temporary file, and returns the contents of that file as an archive.
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 `/`.
RebaseArchiveEntries rewrites the given srcContent archive replacing an occurrence of oldBase with newBase at the beginning of entry names.
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.
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 "".
TarUntar is a convenience function which calls Tar and Untar, with the output of one piped into the other.
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`.
UntarUncompressed reads a stream of bytes from `archive`, parses it as a tar archive, and unpacks it into the directory at `dest`.

# Constants

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.
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.

# 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.
ErrNotImplemented is the error message of function not implemented.

# Structs

No description provided by the author
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
No description provided by the author
TempArchive is a temporary archive.

# Type aliases

No description provided by the author
ChangeType represents the change type.
No description provided by the author
No description provided by the author