archiveutil

package
v1.130.9 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTGZ

func CreateTGZ(ctx context.Context, filenames map[string]string, dest string) error

func ExtractTGZ

func ExtractTGZ(ctx context.Context, archivePath string, dest string) error

func ExtractTGZStripComponents

func ExtractTGZStripComponents(ctx context.Context, archivePath string, dest string, stripComponents int) error

func SafeArchivePath added in v1.130.9

func SafeArchivePath(destDir, hdrName string) (string, error)

SafeArchivePath returns the absolute path within destDir where an archive entry named hdrName should be written, or an error if hdrName attempts to escape destDir. Existing symlinks in the destination are treated as escapes so that an entry whose parent path is a symlink cannot be written outside the extraction root.

Types

This section is empty.

Jump to

Keyboard shortcuts

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