path.dirname
path.dirname
Function
Returns the parent directory path.
Syntax
path(text).dirname()
Parameters
None.
Return value
| Type | Description |
|---|---|
| String | Parent directory path; returns an empty string if there is no parent directory. |
Code Example
result = path('root/docs/index.md').dirname() // Output: root/docs print result
Notes
- No access to the file system.