ziputil

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendFile

func AppendFile(zipFile, dstRefPath, srcPath string) error

AppendFile 向已存在的zip文件追加文件

func AppendFileWithData

func AppendFileWithData(zipFile, dstRefPath string, srcData []byte) error

AppendFileWithData 向已存在的zip文件追加数据

func AppendFileWithOriginalFileListData

func AppendFileWithOriginalFileListData(zipFile, dstRefPath string) error

appendFileWithOriginalFileListData 向已存在的zip文件追加原始文件列表数据

func GetFileList

func GetFileList(zipFile string) ([]string, error)

GetFileList 获取zip文件中的所有文件列表

func UnzipFile

func UnzipFile(zipFilePath, dstDir string) (err error)

UnzipFile unzips a zip file to a destination directory.

func UnzipSpecifiedFile

func UnzipSpecifiedFile(zipFile, srcFile, dstDir string) (string, error)

UnzipSpecifiedFile 解压指定文件到目标目录

func ZipDir

func ZipDir(srcDir, dstPath, srcRoot string, toPrint bool) (err error)

ZipDir 压缩整个目录到指定的目标路径

func ZipFile

func ZipFile(srcPath, dstPath string, toPrint bool) (err error)

ZipFile 压缩单个文件到指定的目标路径

func ZipFiles

func ZipFiles(fileItems []string, dstPath, srcRoot string, toPrint bool) (err error)

ZipFiles compresses multiple files into a single zip file.

func ZipItem

func ZipItem(srcPath, dstPath string, toPrint bool) error

ZipItem 根据源路径类型选择压缩方式

Types

This section is empty.

Jump to

Keyboard shortcuts

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