Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SupportedFactories = map[string]FsFactory{ ".zip": func(f File) (Filesystem, error) { return NewArchive(f, f.Size(), &Zip{}), nil }, ".rar": func(f File) (Filesystem, error) { return NewArchive(f, f.Size(), &Rar{}), nil }, ".7z": func(f File) (Filesystem, error) { return NewArchive(f, f.Size(), &SevenZip{}), nil }, }
Functions ¶
func NewArchive ¶ added in v0.8.0
func NewFileInfo ¶ added in v0.8.0
Types ¶
type ArchiveFile ¶ added in v0.8.0
type ArchiveFile struct {
// contains filtered or unexported fields
}
func NewArchiveFile ¶ added in v0.8.0
func NewArchiveFile(readerFunc func() (iio.Reader, error), len int64) *ArchiveFile
func (*ArchiveFile) Close ¶ added in v0.8.0
func (d *ArchiveFile) Close() (err error)
func (*ArchiveFile) IsDir ¶ added in v0.8.0
func (d *ArchiveFile) IsDir() bool
func (*ArchiveFile) ReadAt ¶ added in v0.8.0
func (d *ArchiveFile) ReadAt(p []byte, off int64) (n int, err error)
func (*ArchiveFile) Size ¶ added in v0.8.0
func (d *ArchiveFile) Size() int64
type ContainerFs ¶
type ContainerFs struct {
// contains filtered or unexported fields
}
func NewContainerFs ¶
func NewContainerFs(fss map[string]Filesystem) (*ContainerFs, error)
type Filesystem ¶
type Filesystem interface { // Open opens the named file for reading. If successful, methods on the // returned file can be used for reading; the associated file descriptor has // mode O_RDONLY. Open(filename string) (File, error) // ReadDir reads the directory named by dirname and returns a list of // directory entries. ReadDir(path string) (map[string]File, error) }
type FsFactory ¶
type FsFactory func(f File) (Filesystem, error)
type MemoryFile ¶ added in v0.8.0
func NewMemoryFile ¶ added in v0.8.0
func NewMemoryFile(data []byte) *MemoryFile
func (*MemoryFile) Close ¶ added in v0.8.0
func (d *MemoryFile) Close() (err error)
func (*MemoryFile) IsDir ¶ added in v0.8.0
func (d *MemoryFile) IsDir() bool
func (*MemoryFile) Size ¶ added in v0.8.0
func (d *MemoryFile) Size() int64
type Torrent ¶
type Torrent struct {
// contains filtered or unexported fields
}
func NewTorrent ¶
func (*Torrent) AddTorrent ¶
func (*Torrent) RemoveTorrent ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.