Documentation
¶
Overview ¶
Package `directory` simple functions to parse and work with directory structure.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Ignore *regexp.Regexp = regexp.MustCompile("")
Ignore is a variable to hold regexp expression of directories and files to ignore.
var WaitGroup sync.WaitGroup
WaitGroup is a variable to easily handle goroutine waiting.
Functions ¶
func SetIgnore ¶
func SetIgnore(ignFilePath string)
SetIgnore sets global Ignore with the contents of ignore file, where each line represents one file or directory to ignore.
func Walk ¶
Walk is a concurrent function that walks recursively given directory structure, performing given actions on files and directories. Actions on files and directories are expected to take the corresponding file/dir path as an argument and not return anything. Directories and files can also be ignored by setting Ignore value with SetIgnore function or setting it manually. Depth of directory structure can be controlled with variables depth (and level).
func WalkLinear ¶
WalkLinear walks recursively given directory structure, performing given actions on files and directories. Actions on files and directories are expected to take the corresponding file/dir path as an argument and not return anything. Directories and files can also be ignored by setting Ignore value with SetIgnore function or setting it manually. Depth of directory structure can be controlled with variables depth (and level).
Types ¶
This section is empty.