archive

package
v0.0.0-...-412a9f7 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2017 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(dst Writer, src Reader) error

Copy copies from src to dest until either EOF is reached on src or an error occurs.

When the archive format of src matches that of dst, Copy streams the files directly into dst. Otherwise, copy buffers the contents to disk to compute headers before writing to dst.

Types

type ReadCloser

type ReadCloser interface {
	Reader
	io.Closer
}

ReadCloser is the interface that groups Reader with the Close method.

func NopCloser

func NopCloser(r Reader) ReadCloser

NopCloser returns a ReadCloser with a no-op Close method wrapping the provided Reader r.

type Reader

type Reader interface {
	NextFile() (name string, err error)
	io.Reader
}

Reader is the interface for reading files from an archive.

type WriteCloser

type WriteCloser interface {
	Writer
	io.Closer
}

WriteCloser is the interface that groups Writer with the Close method.

type Writer

type Writer interface {
	NextFile(name string, fi os.FileInfo) error
	io.Writer
}

Writer is the interface for writing files to an archived format.

Directories

Path Synopsis
Package gzip implements reading and writing of gzip format compressed files.
Package gzip implements reading and writing of gzip format compressed files.

Jump to

Keyboard shortcuts

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