isRooted

fnbool isRooted(R)(R path) if (isRandomAccessRange!R && isSomeChar!(ElementType!R) || is(StringTypeOf!R))

Determines whether a path starts at a root directory.

Parameters

pathA path name.

Returns

Whether a path starts at a root directory.

On POSIX, this function returns true if and only if the path starts with a slash (/).

On Windows, this function returns true if the path starts at the root directory of the current drive, of some other drive, or of a network drive.