drive

The drive of the path p. Note: Non-Windows platforms have no concept of "drives".

drive
(
PathType
)
(
auto ref in PathType p
)
if (
isSomePath!PathType
)

Examples

assertEqual(WindowsPath("").drive, "");
assertEqual(WindowsPath("/Hello/World").drive, "");
assertEqual(WindowsPath("C:/Hello/World").drive, "C:");
assertEqual(PosixPath("").drive, "");
assertEqual(PosixPath("/Hello/World").drive, "");
assertEqual(PosixPath("C:/Hello/World").drive, "");

Meta