zipUtil

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetZipFileList

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

GetZipFileList 获取ZIP文件中的文件列表。 参数:

  • zipFile: ZIP文件路径。

返回:

  • []string: ZIP文件中的文件列表。
  • error: 操作过程中遇到的错误。

func UnZip

func UnZip(unzipFile, unzipDir string) error

UnZip 解压指定的ZIP文件到目标目录。 支持并发解压以提高性能。 参数:

  • unzipFile: 需要解压的ZIP文件路径。
  • unzipDir: 解压目标目录。

返回:

  • error: 操作过程中遇到的错误。

func Zip

func Zip(zipPath string, paths ...string) error

Zip 将指定的目录或文件打包为ZIP压缩包。 如果目标ZIP文件已存在,则会覆盖原有内容。 参数:

  • zipPath: 目标ZIP文件的路径。
  • paths: 需要打包的目录或文件路径列表。

返回:

  • error: 操作过程中遇到的错误。

Types

This section is empty.

Jump to

Keyboard shortcuts

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