RosettaCodeData/Task/Make-directory-path/00DESCRIPTION

12 lines
662 B
Text
Raw Permalink Normal View History

2016-12-05 22:15:40 +01:00
;Task:
2015-02-20 09:02:09 -05:00
Create a directory and any missing parents.
This task is named after the posix <code>[http://www.unix.com/man-page/POSIX/0/mkdir/ mkdir -p]</code> command, and several libraries which implement the same behavior.
Please implement a function of a single path string (for example <code>./path/to/dir</code>) which has the above side-effect.
If the directory already exists, return successfully.
Ideally implementations will work equally well cross-platform (on windows, linux, and OS X).
It's likely that your language implements such a function as part of its standard library. If so, please also show how such a function would be implemented.
2016-12-05 22:15:40 +01:00
<br><br>