tar

package
v0.0.0-...-f2468ff Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2014 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

This package provides convenience helpers on top of archive/tar to be able to tar/untar files with a functionality closer to gnu tar command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TarFiles

func TarFiles(fileList []string, target io.Writer, strip string) (shaSum string, err error)

TarFiles writes a tar stream into target holding the files listed in fileList. strip will be removed from the beginning of all the paths when stored (much like gnu tar -C option) Returns a Sha sum of the tar and nil if everything went well or empty sting and error in case of error. We use a base64 encoded sha1 hash, because this is the hash used by RFC 3230 Digest headers in http responses

func UntarFiles

func UntarFiles(tarFile io.Reader, outputFolder string) error

UntarFiles will extract the contents of tarFile using outputFolder as root

Types

This section is empty.

Jump to

Keyboard shortcuts

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