listDir

Fast templated directory iterator

template listDir(alias handler, Flag!q{includeRoot} includeRoot = No.includeRoot)
void
listDir
(
Path
Args...
)
(
Path dirPath
,
auto ref Args args
)
if (
isPath!Path
)

Members

Functions

listDir
void listDir(Path dirPath, Args args)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

Entry
struct Entry

A pointer to this type will be passed to the listDir predicate.

Examples

   string[] entries;
   listDir!((e) {
	   entries ~= e.fullName.relPath(tmpDir);
	   if (e.entryIsDir)
		   e.recurse();
   })(tmpDir);

If called with Yes.includeRoot, then the callback is first called with the argument, even if it's not a directory.

Meta