Documentation
¶
Overview ¶
Package archive contains the SDK for Zarf archival and compression.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compress ¶
Compress takes any number of source files and archives them into a compressed archive at dest path.
func Decompress ¶
func Decompress(ctx context.Context, sourceArchive, dst string, opts DecompressOpts) (err error)
Decompress takes a Zarf package or arbitrary archive and decompresses it to dst.
Types ¶
type CompressOpts ¶
type CompressOpts struct{}
CompressOpts is a placeholder for future optional Compress params
type DecompressOpts ¶
type DecompressOpts struct {
// UnarchiveAll walks root of the archive and unpacks nested .tar files.
UnarchiveAll bool
// Files, if non-empty, means "only extract these exact archive-paths."
Files []string
// StripComponents drops this many leading path elements from every entry.
StripComponents int
// OverwriteExisting, if true, will truncate existing files instead of failing.
OverwriteExisting bool
// SkipValidation, if true, will skip the validation of a file being present in the archive.
// This is used with unarchiveFiltered to avoid checking for files that are not in the archive.
// This was a previous behavior that the new logic does not support.
SkipValidation bool
}
DecompressOpts provides optional parameters for Decompress
Click to show internal directories.
Click to hide internal directories.