archive

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEntryNotExist = errors.New("not exist")
View Source
var NormalizedDateTime time.Time

Functions

func AddFileToTar added in v0.4.0

func AddFileToTar(tw *tar.Writer, path string, txt string) error

func CreateSingleFileTar

func CreateSingleFileTar(tarFile, path, txt string) error

func CreateSingleFileTarReader

func CreateSingleFileTarReader(path, txt string) (io.Reader, error)

func IsZip

func IsZip(file *os.File) (bool, error)

func ReadDirAsTar

func ReadDirAsTar(srcDir, basePath string, uid, gid int, mode int64) io.ReadCloser

func ReadTarEntry

func ReadTarEntry(rc io.Reader, entryPath string) (*tar.Header, []byte, error)

func ReadZipAsTar

func ReadZipAsTar(srcPath, basePath string, uid, gid int, mode int64) io.ReadCloser

func WriteDirToTar

func WriteDirToTar(tw *tar.Writer, srcDir, basePath string, uid, gid int, mode int64) error

func WriteZipToTar

func WriteZipToTar(tw *tar.Writer, srcZip, basePath string, uid, gid int, mode int64) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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