aboutsummaryrefslogtreecommitdiff
path: root/api/paths.md
diff options
context:
space:
mode:
Diffstat (limited to 'api/paths.md')
-rw-r--r--api/paths.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/api/paths.md b/api/paths.md
index 07f0560b..4beabdc2 100644
--- a/api/paths.md
+++ b/api/paths.md
@@ -253,15 +253,17 @@ assert (./directory).children(include_hidden=yes) == [".git", "foo.txt"]
## Path.create_directory
```tomo
-Path.create_directory : func(path: Path, permissions = Int32(0o755) -> Void)
+Path.create_directory : func(path: Path, permissions = Int32(0o755), recursive = yes -> Void)
```
Creates a new directory at the specified path with the given permissions. If any of the parent directories do not exist, they will be created as needed.
+
Argument | Type | Description | Default
---------|------|-------------|---------
path | `Path` | The path of the directory to create. | -
permissions | `` | The permissions to set on the new directory. | `Int32(0o755)`
+recursive | `` | If set to `yes`, then recursively create any parent directories if they don't exist, otherwise fail if the parent directory does not exist. When set to `yes`, this function behaves like `mkdir -p`. | `yes`
**Return:** Nothing.