zip

package
v0.0.0-...-e225f37 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ZipFolder

func ZipFolder(
	dir path.AbsDir, zipFile path.AbsPath,
	includeGlobs, excludeGlobs []path.Glob,
	logFileError func(de path.DirEntry, err error) error,
) (errOut error)

Types

type ZipperT

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

func New

func New(archiveFile path.AbsPath, stripSubFolders bool, verbose bool) (zpr *ZipperT, errOut error)

New creates a new Zipper object. If a zip archive with the same name already exists it will be renamed to a backup file with a time stamp in the name. If the folder for the zip file does not exist it will be created.

func (*ZipperT) AddBytes

func (zpr *ZipperT) AddBytes(fRelPath path.RelPath, b []byte) error

func (*ZipperT) AddFile

func (zpr *ZipperT) AddFile(fullPath path.AbsPath, fRelPath path.RelPath) (errOut error)

func (*ZipperT) AddReader

func (zpr *ZipperT) AddReader(fRelPath path.RelPath, r io.Reader) (errOut error)

func (*ZipperT) Close

func (zpr *ZipperT) Close() (errOut error)

Jump to

Keyboard shortcuts

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