The OpenD Programming Language

mkdir

Make a new directory pathname.

  1. void mkdir(R pathname)
  2. void mkdir(R pathname)
    void
    mkdir
    (
    R
    )
    (
    auto ref R 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