Documentation ¶
Index ¶
- Constants
- func CompressFile(ct CompressType, outputFilePath string, srcFiles ...string) (err error)
- func CompressToWriter(ct CompressType, out io.Writer, srcFiles ...string) error
- func DeCompressFile(ct CompressType, srcFilePath, outputDir string) error
- func DeCompressFromReader(ct CompressType, reader io.Reader, outputDir string) error
- type CompressType
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
Click to show internal directories.
Click to hide internal directories.