Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( M_ZIP = Magic{0x50, 0x4B, 0x03, 0x04} M_RAR = Magic{0x52, 0x61, 0x72, 0x21, 0x1A, 0x07} M_GZ = Magic{0x1F, 0x8B} M_BZ2 = Magic{0x42, 0x5A, 0x68} M_LZ4 = Magic{0x04, 0x22, 0x4D, 0x18} M_XZ = Magic{0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00} M_AR = Magic{0x21, 0x3C, 0x61, 0x72, 0x63, 0x68, 0x3E, 0x0A} M_7Z = Magic{0x37, 0x7A, 0xBC, 0xAF, 0x27, 0x1C} )
Functions ¶
func Walk ¶
func Walk(ctx context.Context, name, origin string, filter ExtractFileFilter, do WalkFileFunc) (size int64, err error)
Walk 遍历文件/目录/压缩包 name: 检测文件名 origin: 检测数据源 filter: 过滤需要提取的文件 do: 对文件的操作 size: 检测文件大小
Types ¶
type ExtractFileFilter ¶
Click to show internal directories.
Click to hide internal directories.