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: 36 modules, 194 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

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