Skip to content

PurePath.drive property

pathlib-ts > PurePath > drive

Gets the drive prefix for Windows-style paths, or an empty string on POSIX.

Signature:

get drive(): string;

UNC shares are treated as drives. On non-Windows parsers this value is always empty unless manually constructed via PureWindowsPath.