archive

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Zip

type Zip struct {
	// contains filtered or unexported fields
}

Zip represents zip archive.

func NewZip

func NewZip(dest io.Writer) *Zip

NewZip creates compressed (deflate) zip archive.

func (*Zip) AddBytes

func (z *Zip) AddBytes(path string, contents []byte) error

AddBytes add bytes to archive.

func (*Zip) AddDir

func (z *Zip) AddDir(root, target string) error

AddDir to target path in archive. This function doesn't follow symlinks.

func (*Zip) AddFile

func (z *Zip) AddFile(path string, file *os.File) error

AddFile adds a file to archive. AddFile resets mtime.

func (*Zip) Close

func (z *Zip) Close() error

Close Zip writer.

Jump to

Keyboard shortcuts

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