Make directory path

From Rosetta Code
Revision as of 04:22, 9 August 2014 by rosettacode>Bukzor
Make directory path is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.

Given a path to a directory (for example ./path/to/dir) create the directory and any missing parents. If the directory already exists, return successfully.

This task is named after the posix mkdir -p command, and several libraries which implement the same behavior. Ideally implementations will work equally well cross-platform (on windows, linux, and OS X).


{header|Python}

<lang Python> def mkdirp(path):

</lang>