path.ParsedData
The result table of executing path.parse.
┌─────────────────────┬────────────┐ │ dir │ base │ ├──────┬ ├──────┬─────┤ │ root │ │ name │ ext │ " / home/user/dir/ file .txt " └──────┴──────────────┴──────┴─────┘ (All spaces in the "" line should be ignored. They are purely for formatting.)
dir .. name .. ext is always the original path.
Fields
| Name | Type | Description |
|---|---|---|
root | "/" | "" | The root of the file path, "/" for absolute paths, an empty string for relative ones. = "" |
dir | string | The directory of the file path with the root and the trailing slash, e.g. "/home/user/dir/".
An empty string if the file path has no /. = "" |
base | string | The base name of the file path, the file name with extension, e.g. "file.txt". = "" |
name | string | The name of the file without the extension, e.g. "file".
A leading dot is part of the name, e.g. ".bashrc". = "" |
ext | string | The extension of the file with the dot, e.g. ".txt".
An empty string if the file has no extension. = "" |
abs | boolean | Whether the file path is absolute, i.e. starts with /. = false |