DIR结构体类似于FILE,是一个内部结构

  1. struct __dirstream
  2.    {
  3. void *__fd;
  4. char *__data;
  5. int __entry_data;
  6. char *__ptr;
  7. int __entry_ptr;
  8. size_t __allocation;
  9. size_t __size;
  10.     __libc_lock_define (, __lock)
  11.    };
  12. typedef struct __dirstream DIR;

    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 the file system types;

    char d_name[256];                           //filename

    }

相关文章:

  • 2021-07-22
  • 2022-12-23
  • 2021-12-02
  • 2021-11-08
  • 2021-09-11
  • 2022-12-23
猜你喜欢
  • 2021-10-19
  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
  • 2022-01-26
  • 2021-08-24
相关资源
相似解决方案