Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

File Listing Example

Part of StandardLibraryCategory

Example

import std.stdio;
import std.file;
import std.regexp;
 
void main(char[][] args)
{
	char[][] f = listdir(`c:\`,RegExp(`\.pdf$`,"i"));
	
	foreach(char[] ln; f)
		writefln(ln);
}

Source

Based on digitalmars.D.learn:4444 with the fix from digitalmars.D.learn:4445.