Function std.file.DirEntry.isFile
Returns whether the file represented by this
is a file.
DirEntry
On Windows, if a file is not a directory, then it's a file. So,
either
or isFile
will return isDir
true
.
On Posix systems, if
is isFile
true
, that indicates that
the file is a regular file (e.g. not a block not device). So, on
Posix systems, it's possible for both
and isFile
to
be isDir
false
for a particular file (in which case, it's a special
file). You can use
or attributes
to get more
information about a special file (see the stat man page for more
details).
statBuf
Prototype
bool isFile() @property;
Examples
auto de1 = DirEntry("/etc/fonts/fonts.conf"); assert(de1.isFile); auto de2 = DirEntry("/usr/share/include"); assert(!de2.isFile);
Authors
Walter Bright, Andrei Alexandrescu, Jonathan M Davis