Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ZipAppend ¶
func ZipAppend(dst *zip.Writer, src *zip.Reader, f func(header *zip.FileHeader, r *io.ReadCloser, err error) bool) error
根据压缩文件生成新的压缩文件
func ZipFiles ¶
func ZipFiles(dir string, names []string, dstZip io.Writer, f func(dir string, header *zip.FileHeader, r *io.ReadCloser, err error) bool) error
压缩指定目录下指定的文件 f 为过滤函数,可修改相应参数。返回 false 表示忽略不压缩这个文件。 如果输入了目录,也会调用 f 函数,这时 r 为[]byte{}。 即使发生读取错误也会调用 f 函数,如果 f 函数未补全缺失的 header 或 r ,zipFiles 函数将中断并返回错误。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.