recls
Part of StandardLibraryCategory
Warning: This code won't compile with recent versions of DMD/GDC
Description
Demonstrate the fundamentals of using the recls library for recursive directory analysis in D.
Example
import std.recls; void main() { Search search = new Search(".", "*.*", RECLS_FLAG.RECLS_F_RECURSIVE); foreach(Entry entry; search) { with(entry) { if(!ShortFile()) printf("%.*s%.*s\n", DirectoryPath(), File()); else printf("%.*s%.*s (%.*s)\n", DirectoryPath(), File(), ShortFile()); } } }
Future
The std.recls module was removed from Phobos as of DMD 0.155. Its author, Matthew Wilson, plans to keep offering recls for D, but it won't included with the official DMD package.
More Information
You might also want to read the recls FAQ.