zip

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

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 added in v0.6.0

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