rzip

package
v0.0.0-...-09fddc3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFromDirectory

func CreateFromDirectory(source string, buf *os.File, onZip OnZipFn) error

CreateFromDirectory creates a zip archive from the given directory recursively, that is suitable for transporting across machines.

It resolves any symlinks it encounters.

An optional function callback onZip can be passed to observe files being included, or simply to exclude files.

func ExtractTarGzToDirectory

func ExtractTarGzToDirectory(artifactPath string, targetDirectory string) error

ExtractTarGzToDirectory extracts a .tar.gz archive to the specified target directory

func ExtractToDirectory

func ExtractToDirectory(artifactPath string, targetDirectory string) error

Types

type OnZipFn

type OnZipFn func(src string, info os.FileInfo) (bool, error)

OnZipFn is a function that is invoked on each file or directory, returning a bool to indicate whether the entry should be included in the final zip.

Jump to

Keyboard shortcuts

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