#pragma once #ifndef FILEOPERATOR_H #define FILEOPERATOR_H #include "BaseConstVariable.h" #include #include #include #include #include #include #include #include #include #include #include #include #include bool isDirectory(const QString& path); bool isExists(const QString& path); bool isFile(const QString& path); void removeFile(const QString& filePath); unsigned long convertToULong(const QString& input); /// /// 获取文件(绝对路径) /// /// /// /// std::vector getFilelist(const QString& folderpath, const QString& FilenameExtension = ".*",int (*logfun)(QString logtext,int value)=nullptr); QString getParantFolderNameFromPath(const QString& path); QString getFileNameFromPath(const QString& path); QString getFileNameWidthoutExtend(QString path); int write_binfile(char* filepath, char* data, size_t data_len); char* read_textfile(char* text_path, int* length); bool exists_test(const QString& name); size_t fsize(FILE* fp); QString getParantFromPath(const QString& path); void copyFile(const QString& sourcePath, const QString& destinationPath); QString addMaskToFileName(const QString& filePath, QString _zzname); // QT FileOperator bool copyAndReplaceFile(const QString& sourceFilePath, const QString& destinationFilePath); #endif