driveName

fnauto driveName(R)(R path) if (isRandomAccessRange!R && hasSlicing!R && hasLength!R && isSomeChar!(ElementType!R) && !isSomeString!R)

Get the drive portion of a path.

Parameters

pathstring or range of characters

Returns

A slice of path that is the drive, or an empty range if the drive

is not specified. In the case of UNC paths, the network share is returned.

Always returns an empty range on POSIX.

fnauto driveName(C)(C[] path) if (isSomeChar!C)

ditto