zipz

package
v0.0.51 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDoNotUnzipAFileAtRiskOfZipSlip = errors.New("zipz: do not unzip a file at risk of zip slip")

Functions

func UnzipFile

func UnzipFile(srcZipFilePath, dstDir string, opts ...UnzipFileOption) (paths []string, err error)

func ZipDir

func ZipDir(srcDir string, w io.Writer, opts ...ZipDirOption) error

Types

type UnzipFileOption

type UnzipFileOption interface {
	// contains filtered or unexported methods
}

func UnzipFileWithFileInZipHandler

func UnzipFileWithFileInZipHandler(f func(zipfile *zip.File, dstDir string) error) UnzipFileOption

type ZipDirOption

type ZipDirOption interface {
	// contains filtered or unexported methods
}

func ZipDirWithPathInZipHandler

func ZipDirWithPathInZipHandler(f func(path string) string) ZipDirOption

func ZipDirWithWalkHandler

func ZipDirWithWalkHandler(f func(path string, info os.FileInfo, err error) error) ZipDirOption

Jump to

Keyboard shortcuts

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