tar

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2025 License: AGPL-3.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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