chapel-lang/chapel — pull request #317 by lydia-duncan (2014-09-05 20:23:06+00:00)
Title: Add mkdir to Chapel

Add the function mkdir to Chapel. Mkdir takes in a directory name to create, the permissions to create it
with, and a boolean indicating if any missing parent directories should be created first. There are two
versions: one which halts with an error message if one occurred, and one which merely returns the error
code via an out parameter.

Implementation details: the Chapel code calls out to a qio.c implementation. If the caller has indicated it
wishes to create missing parent directories, then the function will attempt to do so by traversing the
provided path and attempting to create each parent directory as it goes, ignoring errors it may encounter
(as some of them will be "this directory already exists" errors, which we do not care about). Then the
function will attempt to create the indicated directory, returning any errors it encounters in this last step.

8 tests accompany this feature, residing in test/io/lydia/mkdir/