path.filename
path.filename
Function
Returns the filename without extension.
Syntax
path(text).filename()
Parameters
None.
Return value
| Type | Description |
|---|---|
| String | File name without extension. |
Code Example
result = path('root/docs/index.md').filename() // Output: index print result
Notes
- Only the last segment of the path is processed.