You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.1 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __DIR_H
  2. #define __DIR_H
  3. #include <direct.h>
  4. #ifndef MAX_PATH
  5. #define MAX_PATH 260
  6. #endif
  7. #ifndef MAXPATH
  8. #define MAXPATH MAX_PATH
  9. #endif
  10. #ifndef FA_NORMAL
  11. #define FA_NORMAL 0x00 /* Normal file, no attributes */
  12. #define FA_RDONLY 0x01 /* Read only attribute */
  13. #define FA_HIDDEN 0x02 /* Hidden file */
  14. #define FA_SYSTEM 0x04 /* System file */
  15. #define FA_LABEL 0x08 /* Volume label */
  16. #define FA_DIREC 0x10 /* Directory */
  17. #define FA_ARCH 0x20 /* Archive */
  18. #endif /* FA_NORMAL */
  19. #ifndef _FFBLK_DEF
  20. #define _FFBLK_DEF
  21. struct ffblk {
  22. long ff_reserved;
  23. long ff_fsize;
  24. unsigned long ff_attrib;
  25. unsigned short ff_ftime;
  26. unsigned short ff_fdate;
  27. char ff_name[MAXPATH];
  28. };
  29. #endif
  30. #define getdisk() (_getdrive() + 1)
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. int findfirst( const char *__path,
  35. struct ffblk *__ffblk,
  36. int __attrib );
  37. int findnext( struct ffblk *__ffblk );
  38. int findclose( struct ffblk *__ffblk );
  39. #ifdef __cplusplus
  40. }
  41. #endif
  42. #endif /* __DIR_H */