vzip

package
v0.0.0-...-3d16465 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DefaultZipLimitSize = 8 * 1024 * 1024

Variables

This section is empty.

Functions

func AddDirToZip

func AddDirToZip(writer *zip.Writer, baseDirLen int, dir string) error

AddDirToZip add all files under the target directory into a zip file.

func AddFileToZip

func AddFileToZip(zipWriter *zip.Writer, filePath, pathInZip string) error

AddFileToZip add a single file into a zip file.

func LimitUnzip

func LimitUnzip(src, destDir string, limitSize int64) error

LimitUnzip decompress a zip archive, while limit the size of a single containing file.

func Unzip

func Unzip(src, destDir string) error

Unzip will decompress a zip archive, moving all files and folders within the zip file (parameter 1) to an output directory (parameter 2).

func ZipDir

func ZipDir(zipPath, dir string) error

ZipDir compresses a directory into a zip archive file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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