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 archives the given sources into dest, selecting the format by dest's extension.
func Decompress ¶
func Decompress(ctx context.Context, source, dst string, opts DecompressOpts) error
Decompress extracts source into dst, using strip or filter logic per opts, then optionally nests.
Types ¶
type CompressOpts ¶
type CompressOpts struct{}
CompressOpts holds future optional parameters for Compress.
type DecompressOpts ¶
type DecompressOpts struct {
// UnarchiveAll enables recursive unpacking of nested .tar files.
UnarchiveAll bool
// Files restricts extraction to these archive paths if non-empty.
Files []string
// StripComponents drops leading path elements from each entry.
StripComponents int
// OverwriteExisting truncates existing files instead of erroring.
OverwriteExisting bool
// SkipValidation suppresses errors for missing Files entries.
SkipValidation bool
// Extractor allows the user to specify which extractor should be used for decompression.
// If this is not set it will be determined automatically from the file extension
Extractor archives.Extractor
}
DecompressOpts defines optional behavior for Decompress.
Click to show internal directories.
Click to hide internal directories.