{"modulePath":"github.com/hyperhq/hypercli","version":"v1.10.16","isLatest":true,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package chrootarchive\n\n## Functions\n\n```go\nfunc ApplyLayer(dest string, layer archive.Reader) (size int64, err error)\n```\nApplyLayer parses a diff in the standard layer format from \\`layer\\`, and applies it to the directory \\`dest\\`. The stream \\`layer\\` can only be uncompressed. Returns the size in bytes of the contents of the layer.\n\n```go\nfunc ApplyUncompressedLayer(dest string, layer archive.Reader, options *archive.TarOptions) (int64, error)\n```\nApplyUncompressedLayer parses a diff in the standard layer format from \\`layer\\`, and applies it to the directory \\`dest\\`. The stream \\`layer\\` can only be uncompressed. Returns the size in bytes of the contents of the layer.\n\n```go\nfunc CopyFileWithTar(src, dst string) (err error)\n```\nCopyFileWithTar emulates the behavior of the 'cp' command-line for a single file. It copies a regular file from path \\`src\\` to path \\`dst\\`, and preserves all its metadata.\n\nIf \\`dst\\` ends with a trailing slash '/' ('\\\\' on Windows), the final destination path will be \\`dst/base(src)\\` or \\`dst\\\\base(src)\\`\n\n```go\nfunc CopyWithTar(src, dst string) error\n```\nCopyWithTar creates a tar archive of filesystem path \\`src\\`, and unpacks it at filesystem path \\`dst\\`. The archive is streamed directly with fixed buffering and no intermediary disk IO.\n\n```go\nfunc TarUntar(src, dst string) error\n```\nTarUntar is a convenience function which calls Tar and Untar, with the output of one piped into the other. If either Tar or Untar fails, TarUntar aborts and returns the error.\n\n```go\nfunc Untar(tarArchive io.Reader, dest string, options *archive.TarOptions) error\n```\nUntar reads a stream of bytes from \\`archive\\`, parses it as a tar archive, and unpacks it into the directory at \\`dest\\`. The archive may be compressed with one of the following algorithms:\n\n\tidentity (uncompressed), gzip, bzip2, xz.\n\n```go\nfunc UntarPath(src, dst string) error\n```\nUntarPath is a convenience function which looks for an archive at filesystem path \\`src\\`, and unpacks it at \\`dst\\`.\n\n```go\nfunc UntarUncompressed(tarArchive io.Reader, dest string, options *archive.TarOptions) error\n```\nUntarUncompressed reads a stream of bytes from \\`archive\\`, parses it as a tar archive, and unpacks it into the directory at \\`dest\\`. The archive must be an uncompressed stream.\n\n","path":"github.com/hyperhq/hypercli/pkg/chrootarchive","name":"chrootarchive","synopsis":"","isRedistributable":true}
