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._mkdir

The code before used the POSIX function mkdir on Windows. That function is now deprecated and fails with long paths, so instead we use the newer CreateDirectoryW.

int _mkdir (
  const(char)[] path
) nothrow;

CreateDirectoryW is the unicode version of the generic macro CreateDirectory. CreateDirectoryA has a file path limitation of 248 characters, mkdir fails with less and might fail due to the number of consecutive ..s in the path. CreateDirectoryW also normally has a 248 character limit, unless the path is absolute and starts with \\?\. Note that this is different from starting with the almost identical \\?.

Parameters

NameDescription
path The path to create.

Returns

0 on success, 1 on failure.

References

https

//msdn.microsoft.com/en-us/library/windows/desktop/aa363855(v=vs.85).aspx

Authors

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

License

Boost License 1.0