Path.isFile

bool isFile() const @safe

Checks if the path is a file.

Returns

true if the path is an existing regular file, false

otherwise (including when the path does not exist).