Holds information about a directory entry
#include <dirent.h>
typedef struct dirent {
uint32_t d_userspec;
uint32_t d_flags;
mode_t d_type;
mode_t d_mode;
ino_t d_ino;
off64_t d_size;
uint32_t d_spare[55];
uint8_t d_pad1;
uint8_t d_pad2;
uint8_t d_pad3;
uint8_t d_namelen;
char d_name[NAME_MAX+1];
} DIR;
Provides a field for the caller; whatever the caller puts in this field is left untouched.
Currently unused.
Specifies the type of entry. See Directory Entry Types.
Specifies the file access mode. For a list of possible values, see File Access Modes and NetWare Attributes.
Specifies the directory entry number assigned to the entry specified by the d_name field.
Specifies the entry's size, in bytes; used for files only.
Currently unused.
Provides padding.
Provides padding.
Provides padding.
Specifies the length of the name in the d_name field.
Specifies the name of the entry.
The POSIX specification defines only one field for this structure, the d_name field. This is the only portable field in the structure.