archive

package
v0.3.18 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const FileExtension = ".tar.gz"

Variables

View Source
var (
	ErrExtractFailed = errors.New("extract failed")
	ErrMissingInput  = errors.New("missing input")
)

Functions

func Create

func Create(fsys fs.FS, files []string, out string) error

Create writes the provided files to a compressed archive at 'out'. The implementation follows from https://www.arthurkoziel.com/writing-tar-gz-files-in-go/.

func Extract

func Extract(ctx context.Context, archive, out string) error

Extract uncompresses the files within the archive at 'archive' and copies them to the directory 'out'.

Types

This section is empty.

Jump to

Keyboard shortcuts

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