walkDirFiltered

Walks through all the entries in a directory, and applies the given visitor function to all entries for which a given filter function returns true.

void
walkDirFiltered
(
string dir
,
void delegate
(
DirEntry entry
)
visitor
,
bool delegate
(
DirEntry entry
)
filter
,
bool recursive = true
,
int maxDepth = -1
)

Parameters

dir string

The directory to walk through.

visitor void delegate
(
DirEntry entry
)

A visitor delegate function to apply to all entries discovered.

filter bool delegate
(
DirEntry entry
)

A filter delegate that determines if an entry should be visited.

recursive bool

Whether to recursively walk through subdirectories.

maxDepth int

How deep to search recursively. -1 indicates infinite recursion.

Meta