2024-11-15 01:38:46 +00:00
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#ifndef FILEOPERATOR_H
|
|
|
|
|
#define FILEOPERATOR_H
|
|
|
|
|
#include "BaseConstVariable.h"
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <memory.h>
|
|
|
|
|
#include <memory>
|
|
|
|
|
#include <io.h>
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <QString>
|
|
|
|
|
#include <QDir>
|
|
|
|
|
#include <QFile>
|
|
|
|
|
#include <QDebug>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取文件(绝对路径)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="folderpath"></param>
|
|
|
|
|
/// <param name="FilenameExtension"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
std::vector<QString> getFilelist(const QString& folderpath, const QString& FilenameExtension = ".*",int (*logfun)(QString logtext,int value)=nullptr);
|
|
|
|
|
|
|
|
|
|
QString getParantFolderNameFromPath(const QString& path);
|
|
|
|
|
|
|
|
|
|
QString getFileNameFromPath(const 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);
|
2024-11-15 06:21:50 +00:00
|
|
|
|
QString addMaskToFileName(const QString& filePath, QString _zzname);
|
2024-11-15 01:38:46 +00:00
|
|
|
|
// QT FileOperator
|
|
|
|
|
#endif
|