Documentation ¶
Overview ¶
Package file provides file system support, including file system walking
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type VisitFunc ¶
VisitFunc is a function which is called for each file and folder visited. The function should return an error if the walk should be terminated.
type WalkFS ¶
func NewWalker ¶
Create a new walkfs with a given visitor function, which is used for touching each visited file and folder
func (*WalkFS) Exclude ¶
Exclude adds a path or file extension exclusion to the indexer. If it begins with a '.' then a file extension exlusion is added, If it begins with a '/' then a path extension exclusion is added. Path and name exclusions are case-sensitive, file extension exclusions are not.
func (*WalkFS) Include ¶
Include adds a file extension inclusion to the indexer. Path exclusions are case-sensitive, file extension exclusions are not. If no inclusions are added, all files are visited
func (*WalkFS) ShouldVisit ¶
ShouldVisit returns true if a path or file should be visited based on exclusions or else returns false