zip

package
v0.131.1-beta1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

type Writer struct {
	W       *zip.Writer
	M       sauceignore.Matcher
	ZipFile *os.File
}

Writer is a wrapper around zip.Writer and implements zip archiving for archive.Writer.

func New added in v0.47.0

func New(f io.Writer, matcher sauceignore.Matcher) (Writer, error)

New returns a new Writer that archives files to the specified io.Writer.

func NewFileWriter added in v0.47.0

func NewFileWriter(name string, matcher sauceignore.Matcher) (Writer, error)

NewFileWriter returns a new Writer that archives files to name.

func (*Writer) Add

func (w *Writer) Add(src, dst string) (int, error)

Add adds the file at src to the destination dst in the archive and returns a count of the files added to the archive.

func (*Writer) Close

func (w *Writer) Close() error

Close closes the archive. Adding more files to the archive is not possible after this.

Jump to

Keyboard shortcuts

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