PurePath.parent property
pathlib-ts > PurePath > parent
PurePath.parent property
Section titled “PurePath.parent property”Returns the lexical (logical) parent of the current path.
Signature:
get parent(): PurePath;Remarks
Section titled “Remarks”Anchors (e.g. / or drive roots) are idempotent parents of themselves. To walk physical directories, combine this with Path.resolve() to eliminate .. components and symlinks.