ParsedPath
import { ParsedPath } from "jsr:@ende/path/types";interface
interface ParsedPathA parsed path object generated by path.parse() or consumed by path.format().
Example
import { parse } from "@ende/path";
const parsedPathObj = parse("c:\\path\\dir\\index.html");
parsedPathObj.root; // "c:\\"
parsedPathObj.dir; // "c:\\path\\dir"
parsedPathObj.base; // "index.html"
parsedPathObj.ext; // ".html"
parsedPathObj.name; // "index"
Properties
root
root: stringThe root of the path such as '/' or 'c:'
dir
dir: stringThe full directory path of the parent such as '/home/user/dir' or 'c:\path\dir'
base
base: stringThe file name including extension (if any) such as 'index.html'
ext
ext: stringThe file extension (if any) such as '.html'
name
name: stringThe file name without extension (if any) such as 'index'