PurePath.root property
pathlib-ts > PurePath > root
PurePath.root property
Section titled “PurePath.root property”A string representing the (local or global) root, if any.
Signature:
get root(): string;Remarks
Section titled “Remarks”Gets the root component (such as / or \\) following the drive, when present. For UNC paths the root reflects the separator after the host/share. POSIX roots collapse repeated slashes according to CPython rules.