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

1 assertEqual(WindowsPath("").drive, "");
2 assertEqual(WindowsPath("/Hello/World").drive, "");
3 assertEqual(WindowsPath("C:/Hello/World").drive, "C:");
4 assertEqual(PosixPath("").drive, "");
5 assertEqual(PosixPath("/Hello/World").drive, "");
6 assertEqual(PosixPath("C:/Hello/World").drive, "");

Meta