file.h 1.3 KB

123456789101112131415161718192021222324
  1. #ifndef AFUN_FILE_H
  2. #define AFUN_FILE_H
  3. #include "aFunToolExport.h"
  4. /* 文件处理工具 */
  5. namespace aFuntool {
  6. AFUN_TOOL_EXPORT int checkFile(const std::string &path);
  7. AFUN_TOOL_EXPORT time_t getFileMTime(const std::string &path);
  8. AFUN_TOOL_EXPORT std::string joinPath(const std::string &path, const std::string &name, const std::string &suffix);
  9. AFUN_TOOL_EXPORT std::string getFileName(const std::string &path);
  10. AFUN_TOOL_EXPORT std::string getFilePathName(const std::string &path);
  11. AFUN_TOOL_EXPORT std::string getFilePath(const std::string &path_1, int dep);
  12. AFUN_TOOL_EXPORT std::string getFileSurfix(const std::string &path);
  13. AFUN_TOOL_EXPORT std::string fileNameToVar(const std::string &name);
  14. AFUN_TOOL_EXPORT std::string findPath(const std::string &path, const std::string &env);
  15. AFUN_TOOL_EXPORT std::string getExedir(int dep);
  16. AFUN_TOOL_EXPORT uintmax_t getFileSize(const std::string &path);
  17. AFUN_TOOL_EXPORT bool isCharUTF8(const char *str);
  18. AFUN_TOOL_EXPORT bool isCharUTF8(const std::string &str);
  19. AFUN_TOOL_EXPORT FILE *fileOpen(const std::string &path_, const char *mode_);
  20. AFUN_TOOL_EXPORT FILE *fileOpen(const char *path_, const char *mode_);
  21. AFUN_TOOL_EXPORT int fileClose(FILE *file);
  22. }
  23. #endif //AFUN_FILE_H