filesystem to scan
path to the base directory (if empty, defaults to current working directory)
if true, the search will recurse into subdirectories
void listImagesInDirectory(ReadOnlyFileSystem fs, string baseDir = "") { foreach (entry; fs.findFiles(baseDir, true) .filter!(entry => entry.isFile) .filter!(entry => !matchFirst(entry.name, `.*\.(gif|jpg|png)$`).empty)) { writefln("%s", entry.name); } }
Find files in the specified directory