View source code Display the source code in std/file.d from which this page was generated on github. Improve this page Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone. Page wiki View or edit the community-maintained wiki page associated with this page.

Struct std.file.DirEntry

Info on a file, similar to what you'd get from stat on a Posix system.

Constructors

Name Description
this Constructs a DirEntry for the given file (or directory).

Properties

Name Type Description
attributes [get] uint Returns the attributes of the file represented by this DirEntry.
isDir [get] bool Returns whether the file represented by this DirEntry is a directory.
isFile [get] bool Returns whether the file represented by this DirEntry is a file.
isSymlink [get] bool Returns whether the file represented by this DirEntry is a symbolic link.
linkAttributes [get] uint On Posix systems, if the file represented by this DirEntry is a symbolic link, then linkAttributes are the attributes of the symbolic link itself. Otherwise, linkAttributes is identical to attributes.
name [get] string Returns the path to the file represented by this DirEntry.
size [get] ulong Returns the size of the the file represented by this DirEntry in bytes.
statBuf [get] core.sys.posix.sys.stat.stat_t This function is Posix-Only.
timeCreated [get] SysTime This function is Windows-Only.
timeLastAccessed [get] SysTime Returns the time that the file represented by this DirEntry was last accessed.
timeLastModified [get] SysTime Returns the time that the file represented by this DirEntry was last modified.

Authors

Walter Bright, Andrei Alexandrescu, Jonathan M Davis

License

Boost License 1.0.

Comments