extract

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIllegalPath = errors.New("illegal path")
)

Functions

func Extract

func Extract(img v1.Image, dir string, opts ...Option) error

Extract extracts all content from the image to the provided path.

func ExtractDirs

func ExtractDirs(img v1.Image, dirs map[string]string, opts ...Option) error

ExtractDirs extracts content from the image, honoring the directory map when deciding where on the local filesystem to place the extracted files. For example: {"/bin": "/usr/local/bin", "/etc": "/etc", "/etc/rancher": "/opt/rancher/etc"}

Types

type Option added in v0.3.1

type Option func(*options) error

An Option modifies the default file extraction behavior

func WithMode added in v0.3.1

func WithMode(mode os.FileMode) Option

WithMode overrides the default mode used when extracting files and directories.

Jump to

Keyboard shortcuts

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