Make directory path: Difference between revisions

(Added 11l)
Line 493:
(! "mkdir -p /tmp/rosetta/test2")
(exit)</lang>
 
=={{header|Nim}}==
Note that the procedure "createDir" used here doesn’t raise an exception if the directory already exists because for current situations this is not an error. An exception is raised if the directory doesn’t exist after the call, if, for instance, permission is not allowed to create the directory.
<lang Nim>import os
 
try:
createDir("./path/to/dir")
echo "Directory now exists."
except OSError:
echo "Failed to create the directory."</lang>
 
=={{header|Objeck}}==
Anonymous user