Documentation ¶
Index ¶
- type ReadCloseSeeker
- type ZipPool
- func (cfp *ZipPool) Close() error
- func (cfp *ZipPool) GetPath(fileIndex int64) string
- func (cfp *ZipPool) GetReadSeeker(fileIndex int64) (io.ReadSeeker, error)
- func (cfp *ZipPool) GetReader(fileIndex int64) (io.Reader, error)
- func (cfp *ZipPool) GetRelativePath(fileIndex int64) string
- func (cfp *ZipPool) GetSize(fileIndex int64) int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReadCloseSeeker ¶
ReadCloseSeeker unifies io.Reader, io.Seeker, and io.Closer
type ZipPool ¶
type ZipPool struct {
// contains filtered or unexported fields
}
ZipPool implements the lake.ZipPool interface based on a Container
func New ¶
NewZipPool creates a new ZipPool from the given Container metadata and a base path on-disk to allow reading from files.
func (*ZipPool) GetPath ¶
GetPath returns the native path of a file (with slashes or backslashes) on-disk, based on the ZipPool's base path
func (*ZipPool) GetReadSeeker ¶
func (cfp *ZipPool) GetReadSeeker(fileIndex int64) (io.ReadSeeker, error)
GetReadSeeker is like GetReader but the returned object allows seeking
func (*ZipPool) GetReader ¶
GetReader returns an io.Reader for the file at index fileIndex Successive calls to `GetReader` will attempt to re-use the last returned reader if the file index is similar. The cache size is 1, so reading in parallel from different files is not supported.
func (*ZipPool) GetRelativePath ¶
GetRelativePath returns the slashed path of a file, relative to the container's root.