listDir.Entry

A pointer to this type will be passed to the listDir predicate.

template listDir(alias handler, Flag!q{includeRoot} includeRoot = No.includeRoot)
static
struct Entry {}

Members

Enums

StatResult
enum StatResult

Result of stat call. Other values are the same as errno.

StatTarget
enum StatTarget

We can stat two different things on POSIX: the directory entry itself, or the link target (if the directory entry is a symbolic link).

Functions

baseName
string baseName()

Returns the base file name as a D string. Allocates.

baseNameFS
const(FSChar)[] baseNameFS()

Returns the base file name, as a D character array, in the operating system's character type. Fast.

baseNameFSPtr
const(FSChar)* baseNameFSPtr()

Returns a pointer to the base file name, as a null-terminated string, in the operating system's character type. Fastest.

fullName
string fullName()

Returns the full file name as a D string. Allocates.

fullNameFS
const(FSChar)[] fullNameFS()

Returns the full file name, as a D character array, in the operating system's character type. Fast.

needStat
stat_t* needStat()

Return the result of stat / lstat (depending on target) for this Entry, performing it first if necessary.

recurse
void recurse(Args args)

Request recursion on the current entry.

recurse
void recurse(Args args)
Undocumented in source. Be warned that the author may not have intended to support it.
stop
void stop()

Stop iteration.

Properties

attributes
uint attributes [@property getter]

Returns the raw POSIX attributes of this directory entry, or the link target if this directory entry is a symlink.

attributes
uint attributes [@property getter]

Returns the raw Windows attributes of this directory entry.

entryIsDir
bool entryIsDir [@property getter]

Returns true if this is a directory. You probably want to use this one to decide whether to recurse.

entryIsDir
bool entryIsDir [@property getter]

Returns true if this is a directory. You probably want to use this one to decide whether to recurse.

entryIsFile
bool entryIsFile [@property getter]

Returns true if this is a file (but not if it's a symlink pointing to one).

entryIsFile
bool entryIsFile [@property getter]

Returns true if this is a file (but not if it's a reparse point pointing to one).

fileID
ulong fileID [@property getter]

Returns the inode number of this directory entry, or the link target if this directory entry is a symlink.

fileID
ulong fileID [@property getter]

Returns the 64-bit unique file index of this file.

isDir
bool isDir [@property getter]

Returns true if this is a directory, or a link pointing to one.

isDir
bool isDir [@property getter]

Returns true if this is a directory, or a reparse point pointing to one.

isFile
bool isFile [@property getter]

Returns true if this is a file, or a link pointing to one.

isFile
bool isFile [@property getter]

Returns true if this is a file, or a reparse point pointing to one.

isSymlink
bool isSymlink [@property getter]

Returns true if this is a symlink.

isSymlink
bool isSymlink [@property getter]

Returns true if this is a reparse point.

linkAttributes
uint linkAttributes [@property getter]

Returns the raw POSIX attributes of this directory entry.

size
ulong size [@property getter]

Returns the size in bytes of this directory entry, or the link target if this directory entry is a symlink.

size
ulong size [@property getter]

Returns the size in bytes of this directory entry.

timeCreated
SysTime timeCreated [@property getter]

Returns the "birth" time of this directory entry, or the link target if this directory entry is a symlink.

timeCreated
SysTime timeCreated [@property getter]

Returns the creation time of this directory entry.

timeLastAccessed
SysTime timeLastAccessed [@property getter]

Returns the "a" time of this directory entry, or the link target if this directory entry is a symlink.

timeLastAccessed
SysTime timeLastAccessed [@property getter]

Returns the last access time of this directory entry.

timeLastModified
SysTime timeLastModified [@property getter]

Returns the "m" time of this directory entry, or the link target if this directory entry is a symlink.

timeLastModified
SysTime timeLastModified [@property getter]

Returns the last modification time of this directory entry.

timeStatusChanged
SysTime timeStatusChanged [@property getter]

Returns the "c" time of this directory entry, or the link target if this directory entry is a symlink.

Structs

Data
struct Data
Undocumented in source.

Variables

data
Data data;
Undocumented in source.
dirFD
int dirFD;

POSIX directory file descriptor.

ent
dirent* ent;

POSIX dirent. May be null with Yes.includeRoot.

findData
WIN32_FIND_DATAW findData;

Windows WIN32_FIND_DATAW.

parent
Entry* parent;

Meta