Dirent结构的成员
发布时间:2020-12-16 07:52:01 所属栏目:百科 来源:网络整理
导读:我已经开始使用dirent.h库了,我在书中遇到了一个非常有用的“struct dirent”结构体,其中struct dirent * p- d_name.但不幸的是,它并没有说明这种结构的任何其他成员; 我想知道这个结构的成员还有什么,他们用了什么? 问候 解决方法 struct dirent的结构是指
我已经开始使用dirent.h库了,我在书中遇到了一个非常有用的“struct dirent”结构体,其中struct dirent * p-> d_name.但不幸的是,它并没有说明这种结构的任何其他成员;
我想知道这个结构的成员还有什么,他们用了什么? 问候 解决方法
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 */ }; 参考:man readdir 或者只是在include目录中查找“dirent.h”. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |