extract

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GZ

type GZ struct {
	// contains filtered or unexported fields
}

func NewGZ

func NewGZ(path string, opt Opts) (*GZ, error)

func (*GZ) Close

func (t *GZ) Close() error

func (*GZ) Lag

func (t *GZ) Lag() (rl *LagInfo, err error)

func (*GZ) NewSourceIndex

func (t *GZ) NewSourceIndex() []reader.SourceIndex

func (*GZ) Read

func (t *GZ) Read(p []byte) (n int, err error)

func (*GZ) Source

func (t *GZ) Source() string

type Opts

type Opts struct {
	IgnoreHidden       bool
	NewFileNewLine     bool
	IgnoreFileSuffixes []string
	ValidFilesRegex    string
}

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

FileReader reader 接口方法

func NewReader

func NewReader(meta *reader.Meta, path string, opt Opts) (*Reader, error)

NewReader 实现对压缩包的读取 还可以实现更多功能: 1. ignoreHidden 忽略压缩包中的隐藏文件 2. suffixes []string 只读某些后缀 3. validFileRegex 只读匹配的文件

func (*Reader) Close

func (r *Reader) Close() error

func (*Reader) Lag

func (r *Reader) Lag() (rl *LagInfo, err error)

func (*Reader) Name

func (r *Reader) Name() string

func (*Reader) NewSourceIndex

func (r *Reader) NewSourceIndex() []reader.SourceIndex

func (*Reader) Read

func (r *Reader) Read(p []byte) (n int, err error)

func (*Reader) ReadDone

func (r *Reader) ReadDone() bool

func (*Reader) Source

func (r *Reader) Source() string

func (*Reader) SyncMeta

func (r *Reader) SyncMeta() error

type SourceReader

type SourceReader interface {
	io.ReadCloser
	reader.NewSourceRecorder
	Source() string
	Lag() (rl *LagInfo, err error)
}

type Tar

type Tar struct {
	// contains filtered or unexported fields
}

func NewTar

func NewTar(path string, opt Opts) (*Tar, error)

func NewTarGz

func NewTarGz(path string, opt Opts) (*Tar, error)

func (*Tar) Close

func (t *Tar) Close() error

func (*Tar) Lag

func (t *Tar) Lag() (rl *LagInfo, err error)

func (*Tar) NewSourceIndex

func (t *Tar) NewSourceIndex() []reader.SourceIndex

func (*Tar) Read

func (t *Tar) Read(p []byte) (n int, err error)

func (*Tar) Source

func (t *Tar) Source() string

type ZIP

type ZIP struct {
	// contains filtered or unexported fields
}

func NewZIP

func NewZIP(path string, opt Opts) (*ZIP, error)

func (*ZIP) Close

func (t *ZIP) Close() error

func (*ZIP) Lag

func (t *ZIP) Lag() (rl *LagInfo, err error)

func (*ZIP) NewSourceIndex

func (t *ZIP) NewSourceIndex() []reader.SourceIndex

func (*ZIP) Read

func (t *ZIP) Read(p []byte) (n int, err error)

func (*ZIP) Source

func (t *ZIP) Source() string

Jump to

Keyboard shortcuts

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