Make directory path: Difference between revisions
m
→{{header|Wren}}: Changed to Wren S/H (future CLI version)
No edit summary |
m (→{{header|Wren}}: Changed to Wren S/H (future CLI version)) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 580:
=={{header|OCaml}}==
<syntaxhighlight lang="ocaml">
if path <> "" then
| Unix.Unix_error (EEXIST, _, _) when Sys.is_directory path -> ()
| Unix.Unix_error (ENOENT, _, _) ->
mkdir_p (Filename.dirname path) perm;
Unix.mkdir path perm</syntaxhighlight>Requires the standard <code>[https://ocaml.org/manual/libunix.html unix]</code> library
▲ Unix.mkdir this perms;
=={{header|Perl}}==
Line 904 ⟶ 897:
{{libheader|DOME}}
Curiously, this can only be done at present from a DOME program. A minimal script to do it would be:
<syntaxhighlight lang="
class Main {
Line 920 ⟶ 913:
var Game = Main.new()</syntaxhighlight>
<br>
However, this functionality
<syntaxhighlight lang="
Directory.create("path/to/dir")</syntaxhighlight>
|