Documentation ¶
Index ¶
- func BuildArchive(tarWriter *tar.Writer, rootPath string, includes []string, excludes []string, ...) (int, error)
- func Extract(tarReader *tar.Reader, rootPath string) error
- func TarGzReader(path string) (f, gz io.ReadCloser, tarReader *tar.Reader, err error)
- func TarGzWriter(path string) (f, gz io.WriteCloser, tarWriter *tar.Writer, err error)
- type TarContentsFile
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 TarGzReader ¶
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.