archive

package
v0.8.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
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

func Decompress(src io.Reader, dst string, options Options) (int64, error)

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 TarCanonicalDigest added in v0.3.0

func TarCanonicalDigest(path string) (digest.Digest, int64, error)

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

func Untar

func Untar(src io.Reader, dst string) (int64, error)

Types

type Options

type Options struct {
	Compress    bool
	KeepRootDir bool
	ToStream    bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL