zippkg

package
v0.2.17 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFileToZip

func AddFileToZip(zipWriter *zip.Writer, srcFilePath, zipFilePath string) error

AddFileToZip 添加文件到zip @param srcFilePath 被压缩资源;例: runtime/videos/xxx.mp4 @param zipFilePath 压缩到zip的路径;例: videos/test.mp4

func Unzip

func Unzip(zipPath, unzipResourceDir string) (err error)

Unzip 解压资源 @param zipPath 压缩资源;例: runtime/zip/videos.zip @param unzipResourceDir 解缩到zip的路径;例: runtime/videos

func UnzipFn

func UnzipFn(zipFile *zip.File, unzipResourceDir string) (err error)

UnzipFn 解压文件到指定目录 @param unzipResourceDir 解缩到zip的路径;例: runtime/videos

func Zip

func Zip(resourcePath string, zipPath string) error

Zip 压缩目录 @param resourcePath 被压缩资源;例: runtime/videos @param zipPath 压缩到zip的路径;例: runtime/zip/videos.zip

func ZipFile

func ZipFile(filePath string, zipPath string) error

ZipFile 压缩目录 @param filePath 被压缩资源;例: runtime/videos/a.mp4 @param zipPath 压缩到zip的路径;例: runtime/zip/videos.zip

Types

This section is empty.

Jump to

Keyboard shortcuts

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