archive

package
v3.0.0-alpha.20251212 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractTar

func ExtractTar(ctx context.Context, s *sys.System, body io.Reader, target string, filters ...Filter) error

ExtractTar extracts a .tar archived stream of data to the given target

func ExtractTarBz2

func ExtractTarBz2(ctx context.Context, s *sys.System, body io.Reader, target string, filters ...Filter) error

ExtractTarBz2 extracts a ..tar.bz2 archived stream of data to the given target

func ExtractTarGz

func ExtractTarGz(ctx context.Context, s *sys.System, body io.Reader, target string, filters ...Filter) error

ExtractTarGz extracts a ..tar.gz archived stream of data to the given target

func ExtractTarball

func ExtractTarball(ctx context.Context, s *sys.System, tarball string, target string, filters ...Filter) error

ExtractTarball extracts a .tar, .tar.gz or .tar.bz2 taball file to the given target. Compression detection is rudimentary and only based on file name extension.

Types

type Filter

type Filter func(h *tar.Header) (bool, error)

Jump to

Keyboard shortcuts

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