tar

package
v0.0.0-...-76c1feb Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(src string, writers ...io.Writer) error

Compress takes a source and variable writers and walks 'source' writing each file found to the tar writer; the purpose for accepting multiple writers is to allow for multiple outputs (for example a file, or md5 hash) Copied with minor modifications from https://medium.com/@skdomino/taring-untaring-files-in-go-6b07cf56bc07

func CompressFolder

func CompressFolder(src, filename string) error

CompressFolder takes the name of a folder to compress, and the name of a file in which to store it.

func Uncompress

func Uncompress(r io.Reader, dst string) error

Uncompress takes an io reader containing a tar/gz archive and expands it to the specified dst folder, trying to retain file modes. Copied with minor modifications from https://medium.com/@skdomino/taring-untaring-files-in-go-6b07cf56bc07

func UncompressFile

func UncompressFile(filename, dst string) error

UncompressFile takes the name of a tar/gz archive file and expands it to the specified dst folder, trying to retain file modes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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