archive

package
v0.0.0-...-a204096 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildArchive

func BuildArchive(tarWriter *tar.Writer, rootPath string, includes []string,
	excludes []string, log *slogger.Logger) (int, error)

BuildArchive reads the rootPath directory into the tar.Writer, taking included and excluded strings into account. Returns the number of files that were added to the archive

func Extract

func Extract(tarReader *tar.Reader, rootPath string) error

Extract unpacks the tar.Reader into rootPath.

func TarGzReader

func TarGzReader(path string) (f, gz io.ReadCloser, tarReader *tar.Reader, err error)

TarGzReader returns a file, gzip reader, and tar reader for the given path. The tar reader wraps the gzip reader, which wraps the file.

func TarGzWriter

func TarGzWriter(path string) (f, gz io.WriteCloser, tarWriter *tar.Writer, err error)

TarGzWriter returns a file, gzip writer, and tarWriter for the path. The tar writer wraps the gzip writer, which wraps the file.

Types

type TarContentsFile

type TarContentsFile struct {
	// contains filtered or unexported fields
}

TarContentsFile represents a tar file on disk.

Jump to

Keyboard shortcuts

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