Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Descriptor ¶
type Descriptor struct {
// contains filtered or unexported fields
}
Descriptor contains information about a file and can be used to read the file contents.
func (*Descriptor) Close ¶
func (d *Descriptor) Close() error
Close the file, on some Loader implementations this might be a no-op. It should *always* be called regardless of file.
type DirectoryLoader ¶
type DirectoryLoader interface { // NextFile must return io.EOF if there is no next value. The returned // descriptor should *always* be closed when no longer needed. NextFile() (*Descriptor, error) }
DirectoryLoader defines an interface which can be used to load files from a directory by iterating over each one in the tree.
func NewDirectoryLoader ¶
func NewDirectoryLoader(root string) DirectoryLoader
NewDirectoryLoader returns a basic DirectoryLoader implementation that will load files from a given root directory path.
func NewTarballLoader ¶
func NewTarballLoader(r io.Reader) DirectoryLoader
NewTarballLoader returns a new DirectoryLoader that reads files out of a gzipped tar archive.
Click to show internal directories.
Click to hide internal directories.