Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AferoFileTreeReader ¶
type AferoFileTreeReader struct {
// contains filtered or unexported fields
}
AferoFileTreeReader provides a primitive API to read directory and it's files, without caring about underlying filesystem and it's structure.
func NewAferoFileTreeReader ¶
func NewAferoFileTreeReader(fs afero.Fs, base string) AferoFileTreeReader
NewAferoFileTreeReader returns a new reader for specified path.
func (AferoFileTreeReader) ReadFile ¶
func (r AferoFileTreeReader) ReadFile(filename string) ([]byte, error)
ReadFile reads the file from file tree named by filename and returns the contents. A successful call returns err == nil, not err == EOF. Because ReadFile reads the whole file, it does not treat an EOF from Read as an error to be reported.
func (AferoFileTreeReader) Walk ¶
Walk walks the file tree, calling walkFn for each file or directory in the tree, including root. All errors that arise visiting files and directories are filtered by walkFn. The files are walked in lexical order, which makes the output deterministic but means that for very large directories Walk can be inefficient. Walk does not follow symbolic links.