ftw.h 678 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef _FTW_H
  2. #define _FTW_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <features.h>
  7. #include <sys/stat.h>
  8. #define FTW_F 1
  9. #define FTW_D 2
  10. #define FTW_DNR 3
  11. #define FTW_NS 4
  12. #define FTW_SL 5
  13. #define FTW_DP 6
  14. #define FTW_SLN 7
  15. #define FTW_PHYS 1
  16. #define FTW_MOUNT 2
  17. #define FTW_CHDIR 4
  18. #define FTW_DEPTH 8
  19. struct FTW
  20. {
  21. int base;
  22. int level;
  23. };
  24. int ftw(const char *, int (*)(const char *, const struct stat *, int), int);
  25. int nftw(const char *, int (*)(const char *, const struct stat *, int, struct FTW *), int, int);
  26. #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
  27. #define ftw64 ftw
  28. #define nftw64 nftw
  29. #endif
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33. #endif