archive

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractTar

func ExtractTar(src, dest string) error

Extract extracts the tar archive at src to dest.

func ExtractZip

func ExtractZip(src, dest string) error

Extract extracts the zip archive at src to dest.

Types

type Archive

type Archive interface {
	Directory(name string) error
	Header(os.FileInfo) (io.Writer, error)
	Close() error
}

Archive is ...

func NewTarArchive

func NewTarArchive(w io.WriteCloser) Archive

NewTarArchive is ...

func NewZipArchive

func NewZipArchive(w io.WriteCloser) Archive

NewZipArchive is ...

type TarArchive

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

TarArchive is ...

func (*TarArchive) Close

func (a *TarArchive) Close() error

Close is ...

func (*TarArchive) Directory

func (a *TarArchive) Directory(name string) error

Directory is ...

func (*TarArchive) Header

func (a *TarArchive) Header(fi os.FileInfo) (io.Writer, error)

Header is ...

type ZipArchive

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

func (*ZipArchive) Close

func (a *ZipArchive) Close() error

Close is ...

func (*ZipArchive) Directory

func (a *ZipArchive) Directory(name string) error

Directory is ...

func (*ZipArchive) Header

func (a *ZipArchive) Header(fi os.FileInfo) (io.Writer, error)

Header is ...

Jump to

Keyboard shortcuts

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