tar

package
v0.5.48 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TarGz

type TarGz struct {
}

func (*TarGz) Compress

func (tg *TarGz) Compress(buf io.Writer, options *TarGzOptions, src []string, ignore ...string) error

Compress compresses the src directory into a tar.gz file optionally a list of globs to be ignored can be passed

func (*TarGz) Uncompress

func (tg *TarGz) Uncompress(src io.Reader, gziped bool, dst string) error

type TarGzOptions

type TarGzOptions struct {
	// OmitRoot when set to true ignores the top level directory in the tar archive
	// only adding sub directories and files.
	// /folder/foo/bar/test.txt -> /test.txt
	// /folder/foo/bar/baz/* -> /baz
	OmitRoot bool
}

Jump to

Keyboard shortcuts

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