Documentation ¶
Index ¶
- type PathPredicate
- type PathWalker
- func (a PathWalker) Do(path string, info os.FileInfo) error
- func (a PathWalker) FollowSymlinks() PathWalker
- func (a PathWalker) If(p PathPredicate) PathWalker
- func (a PathWalker) IfNot(p PathPredicate) PathWalker
- func (a PathWalker) IsDir() PathWalker
- func (a PathWalker) IsFile() PathWalker
- func (a PathWalker) PathContains(s string) PathWalker
- func (a PathWalker) PathHasNotSuffix(s string) PathWalker
- func (a PathWalker) PathHasSuffix(s string) PathWalker
- func (a PathWalker) PathNotContain(s string) PathWalker
- func (a PathWalker) Then(b PathWalker) PathWalker
- func (a PathWalker) Walk(root string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PathPredicate ¶
PathPredicate performs a test against a file being walked
type PathWalker ¶
PathWalker performs a function against a file being walked
func (PathWalker) Do ¶
func (a PathWalker) Do(path string, info os.FileInfo) error
Do will call a PathWalker. If the walker is null then null is returned.
func (PathWalker) FollowSymlinks ¶
func (a PathWalker) FollowSymlinks() PathWalker
FollowSymlinks will cause the walker to follow a symlink, unlike filepath.Walk() with refuses to do do.
func (PathWalker) If ¶
func (a PathWalker) If(p PathPredicate) PathWalker
If will test a path with a PathPredicate and allow the path to be processed only if the PathPredicate passes
func (PathWalker) IfNot ¶
func (a PathWalker) IfNot(p PathPredicate) PathWalker
IfNot is the same as If except only allows processing to continue if the PathPredicate returns false
func (PathWalker) IsDir ¶
func (a PathWalker) IsDir() PathWalker
IsDir allows processing only if the current path is a Directory
func (PathWalker) IsFile ¶
func (a PathWalker) IsFile() PathWalker
IsFile allows processing only if the current path is a File
func (PathWalker) PathContains ¶
func (a PathWalker) PathContains(s string) PathWalker
PathContains allows processing if the path contains the provided string
func (PathWalker) PathHasNotSuffix ¶
func (a PathWalker) PathHasNotSuffix(s string) PathWalker
PathHasNotSuffix allows processing if the path has not got the provided suffix
func (PathWalker) PathHasSuffix ¶
func (a PathWalker) PathHasSuffix(s string) PathWalker
PathHasSuffix allows processing if the path has the provided suffix
func (PathWalker) PathNotContain ¶
func (a PathWalker) PathNotContain(s string) PathWalker
PathNotContain allows processing if the path does not contain the provided string
func (PathWalker) Then ¶
func (a PathWalker) Then(b PathWalker) PathWalker
Then performs the current PathWalker then another PathWalker
func (PathWalker) Walk ¶
func (a PathWalker) Walk(root string) error
Walk performs the actual walk against the built PathWalker