Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TraverseLink = errors.New("traverse symlink, assuming target is a directory")
TraverseLink is a sentinel error for fastWalk, similar to filepath.SkipDir.
Functions ¶
func FastWalk ¶
FastWalk walks the file tree rooted at root, calling walkFn for each file or directory in the tree, including root.
If fastWalk returns filepath.SkipDir, the directory is skipped.
Unlike filepath.Walk:
- file stat calls must be done by the user. The only provided metadata is the file type, which does not include any permission bits.
- multiple goroutines stat the filesystem concurrently. The provided walkFn must be safe for concurrent use.
- fastWalk can follow symlinks if walkFn returns the TraverseLink sentinel error. It is the walkFn's responsibility to prevent fastWalk from going into symlink cycles.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.