Documentation ¶
Index ¶
- Constants
- func Decompress(src io.Reader, dst string, options Options) (int64, error)
- func GzipCompress(in io.Reader) (io.ReadCloser, chan struct{})
- func Lgetxattr(path string, attr string) ([]byte, error)
- func Lsetxattr(path string, attr string, data []byte, flags int) error
- func TarWithRootDir(paths ...string) (readCloser io.ReadCloser, err error)
- func TarWithoutRootDir(paths ...string) (readCloser io.ReadCloser, err error)
- func Untar(src io.Reader, dst string) (int64, error)
- type Options
Constants ¶
const ( // WhiteoutPrefix means this file is a whiteout(deleted at the merge layer) WhiteoutPrefix = ".wh." // WhiteoutMetaPrefix prefix means whiteout has a special meaning and is not // for removing an actual file. Normally these files are excluded from exported // archives. WhiteoutMetaPrefix = WhiteoutPrefix + WhiteoutPrefix // WhiteoutLinkDir is a directory AUFS uses for storing hardlink links to other // layers. Normally these should not go into exported archives and all changed // hardlinks should be copied to the top layer. WhiteoutLinkDir = WhiteoutMetaPrefix + "plnk" // WhiteoutOpaqueDir file means directory has been made opaque - meaning // readdir calls to this directory do not follow to lower layers. WhiteoutOpaqueDir = WhiteoutMetaPrefix + ".opq" )
Variables ¶
This section is empty.
Functions ¶
func Decompress ¶
Decompress this will not change the metadata of original files
func GzipCompress ¶
func GzipCompress(in io.Reader) (io.ReadCloser, chan struct{})
GzipCompress make the tar stream to be gzip stream.
func Lgetxattr ¶
Lgetxattr retrieves the value of the extended attribute identified by attr and associated with the given path in the file system. It will return a nil slice and nil error if the xattr is not set.
func Lsetxattr ¶
Lsetxattr sets the value of the extended attribute identified by attr and associated with the given path in the file system.
func TarWithRootDir ¶
func TarWithRootDir(paths ...string) (readCloser io.ReadCloser, err error)
TarWithRootDir src is the dir or single file to tar not contain the dir newFolder is a folder for tar file
func TarWithoutRootDir ¶
func TarWithoutRootDir(paths ...string) (readCloser io.ReadCloser, err error)
TarWithoutRootDir function will tar files, but without keeping the original dir this is useful when we tar files at the build stage