PurePath.suffix property
pathlib-ts > PurePath > suffix
PurePath.suffix property
Section titled “PurePath.suffix property”Returns the rightmost suffix (including the leading dot) for the last path segment.
Signature:
get suffix(): string;Remarks
Section titled “Remarks”Matches CPython semantics, including treating a standalone dot as a valid suffix in 3.14+. Use this when you need to dispatch on file extensions without mutating the path.