ask*_*ish 27
结构,struct dirent指的是目录条目.
http://www.gnu.org/software/libc/manual/html_node/Directory-Entries.html
在linux中它被定义为:
struct dirent {
ino_t d_ino; /* inode number */
off_t d_off; /* offset to the next dirent */
unsigned short d_reclen; /* length of this record */
unsigned char d_type; /* type of file; not supported
by all file system types */
char d_name[256]; /* filename */
};
Run Code Online (Sandbox Code Playgroud)
参考: man readdir
或者只是在include目录中查找"dirent.h".