import std.algorithm: map;
import std.array: array;
import std.path: baseName;
auto names = Path("/tmp").iterdir().map!(p => baseName(p.str())).array;
// sort if needed for deterministic order
*
Returns
A lazy range yielding
Path elements.
*
Throws
NotFoundError if the path does not exist;
PathErrorif the path is not a directory.