的dirent结构的成员 [英] Members of Dirent structure

查看:199
本文介绍了的dirent结构的成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开始用dirent.h图书馆工作,我该结构的dirent * P-> d_name在我的书跨越结构的direntstructer的一个非常有用的一员来了。但不幸的是它并没有指出这种结构的任何其他成员;

I have started working with dirent.h library and I came across a very useful member of "struct dirent" structer which struct dirent *p->d_name in my book. But unfortunatly it doesn't states any other members of this structure;

我不知道还有什么是该结构的成员,他们用来做什么的?

I was wondering what else are the members of this structure and what are they used for?

问候

推荐答案

结构,结构的dirent 是指目录条目。

<一个href=\"http://www.gnu.org/software/libc/manual/html_node/Directory-Entries.html\">http://www.gnu.org/software/libc/manual/html_node/Directory-Entries.html

在Linux中被定义为:

In linux it is defined as:

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 */
};

指:男人READDIR

或者只是寻找dirent.h的目录里。

Or just look for "dirent.h" in the include directory.

这篇关于的dirent结构的成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆