tarGz

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Lib mapping
	ChangeFileOwner = glfsfs.ChangeFileOwner
)

Functions

func CreateTarballGzip

func CreateTarballGzip(tarballFilename string, filenames []string, compressLvl int) (countedWrittenFiles int, err error)

CreateTarball: create tar.gz file from given filenames. -2 = HuffmanOnly (linear compression, low gain, fast compression) -1 = DefaultCompression

0 = NoCompression
1 -> 9 = BestSpeed -> BestCompression

func CreateTarballXz

func CreateTarballXz(tarballFilename string, filenames []string, compressLvl int) (countedWrittenFiles int, err error)

CreateTarballLXz: create tar.xz file from given filenames. Just for fun test ... but it's really slow, no multi-threading and low size gain.

func Gzip

func Gzip(source, target string) error

Gzip: Pack file

func Tar

func Tar(source, target string) error

Tar: Make standalone tarball

func UnGzip

func UnGzip(source, target string) error

UnGzip: Unpack

func Untar

func Untar(tarball, target string) error

Untar: extract file from tarball

func UntarGzip

func UntarGzip(sourcefile, dst string, filesList *[]string, removeDir bool) (countedWrittenFiles int, err error)

UntarGzip: unpack tar.gz files list. Return len(filesList)=0 if all files has been restored. removeDir means that, before restore folder content, the existing dir will be removed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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