Documentation
¶
Index ¶
- func GetKindByExt(fn string) (archive Kind, compress Kind, err error)
- type Decoder
- func (d *Decoder) Archive(kind Kind) *Decoder
- func (d *Decoder) Compress(kind Kind) *Decoder
- func (d *Decoder) DeCompress(r io.Reader) (dr io.ReadCloser, err error)
- func (d *Decoder) DirectKind(name string) *Decoder
- func (d *Decoder) Extract() (err error)
- func (d *Decoder) GZ() *Decoder
- func (d *Decoder) Read(r io.Reader) *Decoder
- func (d *Decoder) SNZ() *Decoder
- func (d *Decoder) SaveTo(saveTo string) *Decoder
- func (d *Decoder) Source(path string) *Decoder
- func (d *Decoder) Tar() *Decoder
- func (d *Decoder) TrimRootPath(yes ...bool) *Decoder
- func (d *Decoder) Verbose(yes ...bool) *Decoder
- func (d *Decoder) WriteTo() func(r io.Reader) error
- func (d *Decoder) XZ() *Decoder
- func (d *Decoder) ZST() *Decoder
- func (d *Decoder) Zip() *Decoder
- type Kind
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func (*Decoder) DeCompress ¶
DeCompress 解压
func (*Decoder) DirectKind ¶
DirectKind 通过文件名来确定压缩类型
func (*Decoder) TrimRootPath ¶
TrimRootPath 解压时去掉最顶层的文件夹名称
Click to show internal directories.
Click to hide internal directories.