Merge pull request #141 from FraMecca/master
support isFile merged-on-behalf-of: Sönke Ludwig <s-ludwig@users.noreply.github.com>
This commit is contained in:
commit
5b146ab002
|
@ -385,6 +385,9 @@ struct FileInfo {
|
||||||
/// True if this is a directory or a symlink pointing to a directory
|
/// True if this is a directory or a symlink pointing to a directory
|
||||||
bool isDirectory;
|
bool isDirectory;
|
||||||
|
|
||||||
|
/// True if this is a file. On POSIX if both isFile and isDirectory are false it is a special file.
|
||||||
|
bool isFile;
|
||||||
|
|
||||||
/** True if the file's hidden attribute is set.
|
/** True if the file's hidden attribute is set.
|
||||||
|
|
||||||
On systems that don't support a hidden attribute, any file starting with
|
On systems that don't support a hidden attribute, any file starting with
|
||||||
|
@ -737,6 +740,7 @@ private FileInfo makeFileInfo(DirEntry ent)
|
||||||
else ret.timeCreated = ent.timeLastModified;
|
else ret.timeCreated = ent.timeLastModified;
|
||||||
ret.isSymlink = ent.isSymlink;
|
ret.isSymlink = ent.isSymlink;
|
||||||
ret.isDirectory = ent.isDir;
|
ret.isDirectory = ent.isDir;
|
||||||
|
ret.isFile = ent.isFile;
|
||||||
version (Windows) {
|
version (Windows) {
|
||||||
import core.sys.windows.windows : FILE_ATTRIBUTE_HIDDEN;
|
import core.sys.windows.windows : FILE_ATTRIBUTE_HIDDEN;
|
||||||
ret.hidden = (ent.attributes & FILE_ATTRIBUTE_HIDDEN) != 0;
|
ret.hidden = (ent.attributes & FILE_ATTRIBUTE_HIDDEN) != 0;
|
||||||
|
|
Loading…
Reference in a new issue