ftw.h 741 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef _FTW_H
  2. #define _FTW_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. /* Normally we do not nest header includes. However useless bloat
  7. * like ftw may be treated as a special case. Otherwise we would
  8. * have to deal with duplicating all the stat.h mess. */
  9. #include <sys/stat.h>
  10. #define FTW_F 1
  11. #define FTW_D 2
  12. #define FTW_DNR 3
  13. #define FTW_NS 4
  14. #define FTW_SL 5
  15. #define FTW_DP 6
  16. #define FTW_SLN 7
  17. #define FTW_PHYS 1
  18. #define FTW_MOUNT 2
  19. #define FTW_CHDIR 4
  20. #define FTW_DEPTH 8
  21. struct FTW
  22. {
  23. int base;
  24. int level;
  25. };
  26. int ftw(const char *, int (*)(const char *, const struct stat *, int), int);
  27. int nftw(const char *, int (*)(const char *, const struct stat *, int, struct FTW *), int, int);
  28. #ifdef __cplusplus
  29. }
  30. #endif
  31. #endif