Make directory path: Difference between revisions

m
→‎{{header|Wren}}: Changed to Wren S/H (future CLI version)
(→‎OCaml: make the solution cross-platform)
m (→‎{{header|Wren}}: Changed to Wren S/H (future CLI version))
 
(2 intermediate revisions by 2 users not shown)
Line 586:
| Unix.Unix_error (ENOENT, _, _) ->
mkdir_p (Filename.dirname path) perm;
Unix.mkdir path perm</syntaxhighlight>Requires the standard <code>[https://v2.ocaml.org/manual/libunix.html unix]</code> library to be loaded
 
=={{header|Perl}}==
Line 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="ecmascriptwren">import "io" for FileSystem
 
class Main {
Line 913:
var Game = Main.new()</syntaxhighlight>
<br>
However, this functionality willis expected to be added to Wren-cli whenin versionthe 0.4.0next is officially releasedversion. The code needed will be as follows:
<syntaxhighlight lang="ecmascriptwren">import "io" for Directory
 
Directory.create("path/to/dir")</syntaxhighlight>
9,476

edits