Function std.file.dirEntries
Returns an input range
    of DirEntry that lazily iterates a given directory,
    also provides two ways of foreach iteration. The iteration variable can be of
    type string if only the name is needed, or DirEntry
    if additional details are needed. The span mode dictates how the
    directory is traversed. The name of each iterated directory entry
    contains the absolute or relative path (depending on pathname).
						
					
				Note
The order of returned directory entries is as it is provided by the operating system / filesystem, and may not follow any particular sorting.
Parameters
Returns
An input range of
        DirEntry.
Throws
- FileExceptionif the path directory does not exist or read permission is denied.
- FileExceptionif mode is not- shallowand a subdirectory cannot be read.
Example
// Iterate a directory in depth
foreach (string name; dirEntries("destroy/me", SpanModeTo handle subdirectories with denied read permission, use SpanMode:
void scan(string path)
{
    foreach (DirEntry entry; dirEntries(path, SpanModeExample
Duplicate functionality of D1's std:
string[] listdir(string pathname)
{
    import std