cleanup, docs
This commit is contained in:
+13
-10
@@ -2,16 +2,19 @@
|
||||
bool mkdir(String path)
|
||||
|
||||
:params
|
||||
path : the path name to be created
|
||||
return value : returns true if the directory was successfully created
|
||||
path : directory to create
|
||||
return value : true on success
|
||||
|
||||
:content
|
||||
Creates a single directory and returns whether it succeeded. The parent directory must already exist, so build nested paths one level at a time.
|
||||
|
||||
:example
|
||||
dir_remove("/tmp/doc-mkdir-demo", true);
|
||||
mkdir("/tmp/doc-mkdir-demo");
|
||||
print(file_stat("/tmp/doc-mkdir-demo")["is_dir"].to_bool() ? "created" : "not created", "\n");
|
||||
dir_remove("/tmp/doc-mkdir-demo", true);
|
||||
|
||||
:see
|
||||
>sys
|
||||
|
||||
:content
|
||||
Creates the directory named by `path`.
|
||||
|
||||
The function returns `true` when the directory was created successfully.
|
||||
|
||||
:example
|
||||
print("mkdir example\n");
|
||||
dir_remove
|
||||
dir_list
|
||||
|
||||
Reference in New Issue
Block a user