mkdir

Make a new directory pathname.

Parameters

pathname R

the path of the directory to make

Throws

FileException on POSIX or WindowsException on Windows if an error occured.

Examples

import std.file : mkdir;

auto dir = deleteme ~ "dir";
scope(exit) dir.rmdir;

dir.mkdir;
assert(dir.exists);
import std.exception : assertThrown;
assertThrown("a/b/c/d/e".mkdir);

Meta