Path.isDir

bool isDir() const @safe

Checks if the path is a directory.

Returns

true if the path is an existing directory, false

otherwise (including when the path does not exist).