FileName.ensurePathExists

Ensure that the provided path exists

Accepts a path to either a file or a directory. In the former case, the basepath (path to the containing directory) will be checked for existence, and created if it does not exists. In the later case, the directory pointed to will be checked for existence and created if needed.

  1. bool ensurePathExists(const(char)[] path)
    struct FileName
    extern (D) nothrow static
    bool
    ensurePathExists
    (
    const(char)[] path
    )
  2. bool ensurePathExists(const(char)* path)

Parameters

path const(char)[]

a path to a file or a directory

Return Value

Type: bool

true if the directory exists or was successfully created

Meta