archive

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(unpack Unpack, archive, dest string, options *Options) error

Unpack an archive in the real OS filesystem. The destination directory will be created fresh.

func Untar

func Untar(src afero.File, fs afero.Fs, options *Options) error

func UntarReader

func UntarReader(r io.Reader, compressed bool, fs afero.Fs, options *Options) error

func Unzip

func Unzip(src afero.File, fs afero.Fs, options *Options) error

Types

type Options

type Options struct {
	TruncateFileSize int64
	IgnoreSymLinks   bool
}

type TarballWriter added in v0.4.21

type TarballWriter struct {
	// contains filtered or unexported fields
}

func NewTarballFileWriter added in v0.4.21

func NewTarballFileWriter(fs afero.Fs, path string) (*TarballWriter, error)

func NewTarballWriter added in v0.4.21

func NewTarballWriter(file afero.File) *TarballWriter

func (*TarballWriter) Close added in v0.4.21

func (t *TarballWriter) Close() error

func (*TarballWriter) GetFile added in v0.4.21

func (t *TarballWriter) GetFile() afero.File

func (*TarballWriter) Write added in v0.4.21

func (t *TarballWriter) Write(name string, size int64, r io.Reader) error

func (*TarballWriter) WriteFile added in v0.4.21

func (t *TarballWriter) WriteFile(fs afero.Fs, dir, path string) error

type Unpack

type Unpack func(src afero.File, fs afero.Fs, options *Options) error

Jump to

Keyboard shortcuts

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