zip

package
v0.98.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 7 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
}

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

Add adds the file at src to the destination dst in 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