dirent.h 495 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef __GBLIBC_DIRENT_H_
  2. #define __GBLIBC_DIRENT_H_
  3. #include <sys/types.h>
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. struct dirent {
  8. ino_t d_ino;
  9. off_t d_off;
  10. unsigned short d_reclen;
  11. unsigned char d_type;
  12. char d_name[256];
  13. };
  14. typedef struct _DIR {
  15. int fd;
  16. struct dirent dent;
  17. char buffer[232];
  18. int bpos;
  19. int blen;
  20. } DIR;
  21. DIR* opendir(const char* name);
  22. DIR* fdopendir(int fd);
  23. struct dirent* readdir(DIR* dirp);
  24. #ifdef __cplusplus
  25. }
  26. #endif
  27. #endif