tar

package
v0.0.0-...-8e6cb86 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const HeaderOverhead = 512

See https://unix.stackexchange.com/a/557487

Variables

This section is empty.

Functions

func Tar

func Tar(w io.Writer, files []File) error

func Untar

func Untar(in io.Reader, to string, o UntarOptions) (err error)

func UntarContext

func UntarContext(ctx context.Context, in io.ReadCloser, to string, o UntarOptions) (err error)

func UntarList

func UntarList(ctx context.Context, in io.ReadCloser, listPath string, progresss func(read int64)) ([]string, error)

func UntarPath

func UntarPath(ctx context.Context, in, to string, o UntarOptions) (err error)

func Walk

func Walk(tarf io.Reader, fs ...func(*tar.Header, *tar.Reader) error) error

func WalkPath

func WalkPath(ctx context.Context, path string, fs ...func(*tar.Header, *tar.Reader) error) error

Types

type File

type File struct {
	From string
	To   string
}

type UntarOptions

type UntarOptions struct {
	ListPath string
	RO       bool
	Dedup    *sets.StringSet
	Progress func(written int64)
}

Jump to

Keyboard shortcuts

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