dirent.h 864 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef _DIRENT_H
  2. #define _DIRENT_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #define __NEED_ino_t
  7. #define __NEED_off_t
  8. #include <bits/alltypes.h>
  9. typedef struct __DIR_s DIR;
  10. struct dirent
  11. {
  12. ino_t d_ino;
  13. off_t d_off;
  14. unsigned short d_reclen;
  15. unsigned char d_type;
  16. char d_name[1];
  17. };
  18. int closedir(DIR *);
  19. DIR *fdopendir(int);
  20. DIR *opendir(const char *);
  21. struct dirent *readdir(DIR *);
  22. int readdir_r(DIR *, struct dirent *, struct dirent **);
  23. void rewinddir(DIR *);
  24. void seekdir(DIR *, long);
  25. long telldir(DIR *);
  26. int dirfd(DIR *);
  27. int alphasort(const struct dirent **, const struct dirent **);
  28. int scandir(const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const struct dirent **, const struct dirent **));
  29. #ifdef __cplusplus
  30. extern }
  31. #endif
  32. #endif