dirName

fnauto dirName(R)(return scope R path) if (isRandomAccessRange!R && hasSlicing!R && hasLength!R && isSomeChar!(ElementType!R) && !isSomeString!R)

Returns the parent directory of path. On Windows, this includes the drive letter if present. If path is a relative path and the parent directory is the current working directory, returns `"."`.

Parameters

pathA path name.

Returns

A slice of path or `"."`.

Standards

This function complies with the POSIX requirements for the 'dirname' shell utility

(with suitable adaptations for Windows paths).

fnauto dirName(C)(return scope C[] path) if (isSomeChar!C)

ditto