View source code
Display the source code in dmd/root/filename.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Function dmd.root.filename.FileName.ensurePathExists

Ensure that the provided path exists

static bool ensurePathExists (
  const(char)[] path
);

static extern(C++) bool ensurePathExists (
  const(char)* path
);

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.

Parameters

NameDescription
path a path to a file or a directory

Returns

true if the directory exists or was successfully created

Authors

Walter Bright, http://www.digitalmars.com

License

Boost License 1.0