tool_file.h 745 B

1234567891011121314151617181920212223242526272829
  1. #ifndef AFUN_TOOL_FILE_H
  2. #define AFUN_TOOL_FILE_H
  3. #include "aFunToolExport.h"
  4. #ifdef __cplusplus
  5. #include <iostream>
  6. #else
  7. #include <stdio.h>
  8. #endif
  9. /* 文件处理工具 */
  10. #ifndef AFUN_TOOL_C
  11. namespace aFuntool {
  12. #endif
  13. #ifdef __cplusplus
  14. AFUN_TOOL_C_EXPORT_FUNC int checkFile(const std::string &path);
  15. AFUN_TOOL_C_EXPORT_FUNC time_t getFileMTime(const std::string &path);
  16. AFUN_TOOL_C_EXPORT_FUNC uintmax_t getFileSize(const std::string &path);
  17. AFUN_TOOL_EXPORT FILE *fileOpen(const std::string &path_, const char *mode_);
  18. #endif
  19. AFUN_TOOL_C_EXPORT_FUNC FILE *fileOpen(const char *path_, const char *mode_);
  20. AFUN_TOOL_C_EXPORT_FUNC int fileClose(FILE *file);
  21. #ifndef AFUN_TOOL_C
  22. }
  23. #endif
  24. #endif //AFUN_TOOL_FILE_H