Versions in this module Expand all Collapse all v1 v1.13.1 Feb 8, 2017 Changes in this version + const ChangeAdd + const ChangeDelete + const ChangeModify + const HeaderSize + const WhiteoutLinkDir + const WhiteoutMetaPrefix + const WhiteoutOpaqueDir + const WhiteoutPrefix + var ErrCannotCopyDir = errors.New("cannot copy directory") + var ErrDirNotExists = errors.New("no such directory") + var ErrInvalidCopySource = errors.New("invalid copy source content") + var ErrNotDirectory = errors.New("not a directory") + var ErrNotImplemented = errors.New("Function not implemented") + func ApplyLayer(dest string, layer io.Reader) (int64, error) + func ApplyUncompressedLayer(dest string, layer io.Reader, options *TarOptions) (int64, error) + func CanonicalTarNameForPath(p string) (string, error) + func ChangesSize(newDir string, changes []Change) int64 + func CompressStream(dest io.Writer, compression Compression) (io.WriteCloser, error) + func CopyFileWithTar(src, dst string) (err error) + func CopyResource(srcPath, dstPath string, followLink bool) error + func CopyTo(content io.Reader, srcInfo CopyInfo, dstPath string) error + func CopyWithTar(src, dst string) error + func DecompressStream(archive io.Reader) (io.ReadCloser, error) + func ExportChanges(dir string, changes []Change, uidMaps, gidMaps []idtools.IDMap) (io.ReadCloser, error) + func Generate(input ...string) (io.Reader, error) + func GetRebaseName(path, resolvedPath string) (string, string) + func IsArchive(header []byte) bool + func IsArchivePath(path string) bool + func PrepareArchiveCopy(srcContent io.Reader, srcInfo, dstInfo CopyInfo) (dstDir string, content io.ReadCloser, err error) + func PreserveTrailingDotOrSeparator(cleanedPath, originalPath string) string + func RebaseArchiveEntries(srcContent io.Reader, oldBase, newBase string) io.ReadCloser + func ResolveHostSourcePath(path string, followLink bool) (resolvedPath, rebaseName string, err error) + func SplitPathDirEntry(path string) (dir, base string) + func Tar(path string, compression Compression) (io.ReadCloser, error) + func TarResource(sourceInfo CopyInfo) (content io.ReadCloser, err error) + func TarResourceRebase(sourcePath, rebaseName string) (content io.ReadCloser, err error) + func TarUntar(src, dst string) error + func TarWithOptions(srcPath string, options *TarOptions) (io.ReadCloser, error) + func Unpack(decompressedArchive io.Reader, dest string, options *TarOptions) error + func UnpackLayer(dest string, layer io.Reader, options *TarOptions) (size int64, err error) + func Untar(tarArchive io.Reader, dest string, options *TarOptions) error + func UntarPath(src, dst string) error + func UntarUncompressed(tarArchive io.Reader, dest string, options *TarOptions) error + type Archiver struct + GIDMaps []idtools.IDMap + UIDMaps []idtools.IDMap + Untar func(io.Reader, string, *TarOptions) error + func (archiver *Archiver) CopyFileWithTar(src, dst string) (err error) + func (archiver *Archiver) CopyWithTar(src, dst string) error + func (archiver *Archiver) TarUntar(src, dst string) error + func (archiver *Archiver) UntarPath(src, dst string) error + type Change struct + Kind ChangeType + Path string + func Changes(layers []string, rw string) ([]Change, error) + func ChangesDirs(newDir, oldDir string) ([]Change, error) + func OverlayChanges(layers []string, rw string) ([]Change, error) + func (change *Change) String() string + type ChangeType int + func (c ChangeType) String() string + type Compression int + const Bzip2 + const Gzip + const Uncompressed + const Xz + func DetectCompression(source []byte) Compression + func (compression *Compression) Extension() string + type CopyInfo struct + Exists bool + IsDir bool + Path string + RebaseName string + func CopyInfoDestinationPath(path string) (info CopyInfo, err error) + func CopyInfoSourcePath(path string, followLink bool) (CopyInfo, error) + type FileInfo struct + func (info *FileInfo) Changes(oldInfo *FileInfo) []Change + func (info *FileInfo) LookUp(path string) *FileInfo + type TarChownOptions struct + GID int + UID int + type TarOptions struct + ChownOpts *TarChownOptions + Compression Compression + ExcludePatterns []string + GIDMaps []idtools.IDMap + InUserNS bool + IncludeFiles []string + IncludeSourceDir bool + NoLchown bool + NoOverwriteDirNonDir bool + RebaseNames map[string]string + UIDMaps []idtools.IDMap + WhiteoutFormat WhiteoutFormat + type TempArchive struct + Size int64 + func NewTempArchive(src io.Reader, dir string) (*TempArchive, error) + func (archive *TempArchive) Close() error + func (archive *TempArchive) Read(data []byte) (int, error) + type WhiteoutFormat int + const AUFSWhiteoutFormat + const OverlayWhiteoutFormat