Skip to content

PurePath.anchor property

pathlib-ts > PurePath > anchor

The concatenation of the drive and root, or ”.

Signature:

get anchor(): string;

The anchor uniquely identifies the starting point of the path, allowing callers to detect rooted inputs before manipulating relative segments.