zip

package
v1.15.7 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressFile

func CompressFile(data map[string][]byte) ([]byte, error)

func DeCompress

func DeCompress(zipFile, dest string) error

解压

Types

type File

type File struct {
	// contains filtered or unexported fields
}

func (*File) IsDir

func (f *File) IsDir() bool

func (*File) ModTime

func (f *File) ModTime() time.Time

func (*File) Mode

func (f *File) Mode() fs.FileMode

func (*File) Name

func (f *File) Name() string

func (*File) Size

func (f *File) Size() int64

func (*File) Sys

func (f *File) Sys() interface{}

type ZipFile

type ZipFile struct {
	bytes.Buffer
}

func Compress

func Compress(data map[string][]byte) (*ZipFile, error)

压缩文件 files 文件数组,可以是不同dir下的文件或者文件夹 dest 压缩文件存放地址

func NewZipFile

func NewZipFile() *ZipFile

func (*ZipFile) Export

func (f *ZipFile) Export() []byte

Jump to

Keyboard shortcuts

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