file

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2015 License: MPL-2.0 Imports: 12 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(src, dst string) error

func Download

func Download(path string, w io.Writer) error

Download downloads a file

func Progress

func Progress(path string, w io.Writer) error

Progress downloads a file with a fancy progress bar

func Tar

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

Tar 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)

func Untar

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

Untar takes a destination path and a reader; a tar reader loops over the tarfile creating the file structure at 'dst' along the way, and writing any files

Types

type File

type File interface {
	Tar(path string, writers ...io.Writer) error
	Untar(path string, r io.Reader)
	Download(path string, w io.Writer) error
	Progress(path string, w io.Writer) error
}
var (
	Default File = file{}
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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