Versions in this module Expand all Collapse all v0 v0.22.0 Feb 26, 2016 v0.20.4 Jan 21, 2016 v0.20.3 Jan 19, 2016 v0.20.2 Jan 16, 2016 Changes in this version + const ChangeAdd + const ChangeDelete + const ChangeModify + 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 ArchiveReader) (int64, error) + func ApplyUncompressedLayer(dest string, layer ArchiveReader) (int64, error) + func AssertsDirectory(path string) bool + func CanonicalTarNameForPath(p string) (string, error) + func ChangesSize(newDir string, changes []Change) int64 + func CmdStream(cmd *exec.Cmd, input io.Reader) (io.ReadCloser, error) + func CompressStream(dest io.WriteCloser, compression Compression) (io.WriteCloser, error) + func CopyFileWithTar(src, dst string) (err error) + func CopyResource(srcPath, dstPath string) error + func CopyTo(content ArchiveReader, srcInfo CopyInfo, dstPath string) error + func CopyWithTar(src, dst string) error + func DecompressStream(archive io.Reader) (io.ReadCloser, error) + func HasTrailingPathSeparator(path string) bool + func IsArchive(header []byte) bool + func PreserveTrailingDotOrSeparator(cleanedPath, originalPath string) string + func SpecifiesCurrentDir(path string) bool + func SplitPathDirEntry(localizedPath string) (dir, base string) + func Tar(path string, compression Compression) (io.ReadCloser, 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 ArchiveReader) (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 Archive io.ReadCloser + func ExportChanges(dir string, changes []Change) (Archive, error) + func Generate(input ...string) (Archive, error) + func PrepareArchiveCopy(srcContent ArchiveReader, srcInfo, dstInfo CopyInfo) (dstDir string, content Archive, err error) + func TarResource(sourcePath string) (content Archive, err error) + type ArchiveReader io.Reader + type Archiver struct + 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 (change *Change) String() string + type ChangeType int + 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 + func CopyInfoStatPath(path string, mustExist bool) (CopyInfo, error) + type FileInfo struct + func (info *FileInfo) Changes(oldInfo *FileInfo) []Change + func (root *FileInfo) LookUp(path string) *FileInfo + type TarChownOptions struct + GID int + UID int + type TarOptions struct + ChownOpts *TarChownOptions + Compression Compression + ExcludePatterns []string + IncludeFiles []string + IncludeSourceDir bool + Name string + NoLchown bool + NoOverwriteDirNonDir bool + type TempArchive struct + Size int64 + func NewTempArchive(src Archive, dir string) (*TempArchive, error) + func (archive *TempArchive) Close() error + func (archive *TempArchive) Read(data []byte) (int, error)