archive

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedArchive = fmt.Errorf("unsupported archive")
)

Functions

func Walk

func Walk(path string, walkcFunc WalkFunc) error

func Walk7Zip

func Walk7Zip(file *os.File, fileSize int64, walkFunc WalkFunc) error

func WalkTar

func WalkTar(file io.Reader, walkFunc WalkFunc) error

WalkTar may be passed a compressed reader instead of an explicit file

func WalkTarBzip2

func WalkTarBzip2(file *os.File, walkFunc WalkFunc) error

func WalkTarGzip

func WalkTarGzip(file *os.File, walkFunc WalkFunc) error

func WalkTarLz

func WalkTarLz(file *os.File, walkFunc WalkFunc) error

func WalkTarXz

func WalkTarXz(file *os.File, walkFunc WalkFunc) error

func WalkTarZstd

func WalkTarZstd(file *os.File, walkFunc WalkFunc) error

func WalkZip

func WalkZip(file *os.File, fileSize int64, walkFunc WalkFunc) error

Types

type File

type File interface {
	io.Reader
	io.ReaderAt
	io.Seeker
}

func NewFile

func NewFile(fi io.Reader, size int64) (File, error)

NewFile reads the while file into memory and provides a File interface.

type WalkFunc

type WalkFunc func(path string, info fs.FileInfo, r io.Reader, err error) error

WalkFunc defines the function in order to efficiently walk over the archive

Jump to

Keyboard shortcuts

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