PurePath.parents property
pathlib-ts > PurePath > parents
PurePath.parents property
Section titled “PurePath.parents property”Provides indexed access to the sequence of lexical (logical) ancestors of the path.
Signature:
get parents(): PathParents;Remarks
Section titled “Remarks”The returned object implements Iterable, enabling constructs like for (const parent of path.parents). This mirrors CPython behaviour and honours flavour-specific casing rules.