dreamworkAPI
Ctrl K
GitHub
typeDocs / path / ParsedData

path.ParsedData

typesharedmenusource

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

NameTypeDescription
root"/" | ""The root of the file path, "/" for absolute paths, an empty string for relative ones. = ""
dirstringThe 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 /. = ""
basestringThe base name of the file path, the file name with extension, e.g. "file.txt". = ""
namestringThe name of the file without the extension, e.g. "file". A leading dot is part of the name, e.g. ".bashrc". = ""
extstringThe extension of the file with the dot, e.g. ".txt". An empty string if the file has no extension. = ""
absbooleanWhether the file path is absolute, i.e. starts with /. = false
Generated from the dreamwork meta branch.