archiver

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CompressTypeZip = iota
	CompressTypeTar
	CompressTypeTarGz
	CompressTypeTarXZ
	CompressTypeRar
	CompressTypeTarBz2
	CompressTypeTarLz4
	CompressTypeTarSz
)

Variables

This section is empty.

Functions

func CompressFile

func CompressFile(ct CompressType, outputFilePath string, srcFiles ...string) (err error)

CompressFile 将若干文件压缩为指定路径的压缩文件, 请自行确保输入正确的文件扩展名。

func CompressToWriter

func CompressToWriter(ct CompressType, out io.Writer, srcFiles ...string) error

CompressToWriter 将若干文件压缩到指定输出

func DeCompressFile

func DeCompressFile(ct CompressType, srcFilePath, outputDir string) error

DeCompressFile 将压缩文件解压到指定的outputDir文件夹下

func DeCompressFromReader

func DeCompressFromReader(ct CompressType, reader io.Reader, outputDir string) error

DeCompressFromReader 将压缩文件流解压到指定的outputDir文件夹下

Types

type CompressType

type CompressType int

Jump to

Keyboard shortcuts

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