UCE Docs / mkdir

Signature

bool mkdir(String path)

Parameters

path : directory to create
return value : true on success

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);
Output
created