aboutsummaryrefslogtreecommitdiff
path: root/docs/paths.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/paths.md')
-rw-r--r--docs/paths.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/paths.md b/docs/paths.md
index 99891671..6cf986a7 100644
--- a/docs/paths.md
+++ b/docs/paths.md
@@ -49,6 +49,7 @@ intended. Paths can be created from text with slashes using
- [`func child(path: Path, child:Text -> Path)`](#child)
- [`func children(path: Path, include_hidden=no -> [Path])`](#children)
- [`func create_directory(path: Path, permissions=0o755[32] -> Void)`](#create_directory)
+- [`func current_dir(-> Path)`](#current_dir)
- [`func exists(path: Path -> Bool)`](#exists)
- [`func expand_home(path: Path -> Path)`](#expand_home)
- [`func extension(path: Path, full=yes -> Text)`](#extension)
@@ -357,6 +358,25 @@ Nothing.
---
+### `current_dir`
+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.
+
+```tomo
+func current_dir(-> Path)
+```
+
+**Returns:**
+The absolute path of the current directory.
+
+**Example:**
+```tomo
+>> Path.current_dir()
+= (/home/user/tomo)
+```
+
+---
+
### `exists`
Checks if a file or directory exists at the specified path.