Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TreeWalker ¶
type TreeWalker struct {
// contains filtered or unexported fields
}
Distinct type used by the walker package to provide an interface for tree-walking routines. It is responsible for keeping track of all processed file system nodes, client-provided filtering subs and communication channels.
func NewTreeWalker ¶
func NewTreeWalker() *TreeWalker
Constructor. Returns pointer to the TreeWalker object.
func (*TreeWalker) AddFilter ¶
func (tw *TreeWalker) AddFilter(f Filter)
Adds client-provided filter function, that takes an os.FileInfo object as an argument and returns bool, to a chain of filters. Processed file system node (os.FileInfo) is considered valid if and only if all registered filters are passed (return true).
func (*TreeWalker) GetCounts ¶
func (tw *TreeWalker) GetCounts() (uint, uint)
Get count of all directories and files successfully processed by the TreeWalker.
Click to show internal directories.
Click to hide internal directories.