isAbsolute

Whether the path is absolute.

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

Examples

1 assert(!WindowsPath("").isAbsolute);
2 assert(!WindowsPath("/Hello/World").isAbsolute);
3 assert(WindowsPath("C:/Hello/World").isAbsolute);
4 assert(!WindowsPath("foo/bar.exe").isAbsolute);
5 assert(!PosixPath("").isAbsolute);
6 assert(PosixPath("/Hello/World").isAbsolute);
7 assert(!PosixPath("C:/Hello/World").isAbsolute);
8 assert(!PosixPath("foo/bar.exe").isAbsolute);

Meta