| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <dirent.h> struct dirent *de; mode_t file_mode = DTTOIF(de->d_type) |
This macro converts the d_type member of a struct dirent
variable, as returned by readdir (see section readdir) to an
equivalent value of the st_mode member of a struct stat
variable (see section stat).
Note that the access rights are not set in the result returned by this macro. Only the file-type information is copied.
The file's mode bits are returned. If the argument has the value
DT_UNKNOWN, the result will be S_IFREG.
| ANSI/ISO C | No |
| POSIX | No (see note 1) |
Notes:
d_type member in struct dirent.