Documentation ¶
Overview ¶
Package archive xxx
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArchiveErrCode ¶
type ArchiveErrCode int32
ArchiveErrCode 错误码 nolint:revive
const ( // FileTooLarge 文件过大 FileTooLarge ArchiveErrCode = 400413 )
type ArchiveType ¶
type ArchiveType string
ArchiveType 文件类型 nolint:revive
const ( // GZIP gzip GZIP ArchiveType = "GZIP" // ZIP zip ZIP ArchiveType = "ZIP" // TAR tar TAR ArchiveType = "TAR" // Unknown unknown Unknown ArchiveType = "Unknown" )
func IdentifyFileType ¶
func IdentifyFileType(buf []byte) ArchiveType
IdentifyFileType 检测文件类型:zip、zip、tar
type TgzArchive ¶
type TgzArchive struct {
// contains filtered or unexported fields
}
TgzArchive 实现了 Archive 接口,用于处理 gzip 文件
func NewTgzArchive ¶
func NewTgzArchive(destPath string, limitFileSize int64) TgzArchive
NewTgzArchive xxx
type ZipArchive ¶
type ZipArchive struct {
// contains filtered or unexported fields
}
ZipArchive 实现了 Archive 接口,用于处理 zip 文件
func NewZipArchive ¶
func NewZipArchive(destPath string, limitFileSize int64) ZipArchive
NewZipArchive xxx
Click to show internal directories.
Click to hide internal directories.