Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForDir ¶
func ForDir( root string, cb func(depth int, dirname string, fi os.FileInfo) (stop bool, err error), excludes ...string, ) (err error)
ForDir walks on `root` directory and its children fix for log/dir.ForDir.
func ForDirMax ¶
func ForDirMax( root string, initialDepth int, maxDepth int, cb func(depth int, dirname string, fi os.FileInfo) (stop bool, err error), excludes ...string, ) (err error)
ForDirMax walks on `root` directory and its children with nested levels up to `maxLength`.
Example - discover folder just one level
_ = ForDirMax(dir, 0, 1, func(depth int, dirname string, fi os.FileInfo) (stop bool, err error) { if fi.IsDir() { return } // ... doing something for a file, return })
maxDepth = -1: no limit. initialDepth: 0 if no idea.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.