FileOperator.h
#ifndef GPGFRONTEND_FILEOPERATOR_H
#define GPGFRONTEND_FILEOPERATOR_H
#include "core/GpgFrontendCore.h"
namespace GpgFrontend {
class GPGFRONTEND_CORE_EXPORT FileOperator {
public:
static bool ReadFileStd(const std::filesystem::path &file_name,
std::string &data);
static bool WriteFileStd(const std::filesystem::path &file_name,
const std::string &data);
static bool ReadFile(const QString &file_name, QByteArray &data);
static bool WriteFile(const QString &file_name, const QByteArray &data);
static std::string CalculateHash(const std::filesystem::path &file_path);
};
} // namespace GpgFrontend
#endif // GPGFRONTEND_FILEOPERATOR_H
GpgFrontend::FileOperator::ReadFile
static bool ReadFile(const QString &file_name, QByteArray &data)
read file content
Definition: FileOperator.cpp:31
GpgFrontend::FileOperator::WriteFileStd
static bool WriteFileStd(const std::filesystem::path &file_name, const std::string &data)
write file content using std struct
Definition: FileOperator.cpp:69
GpgFrontend
Definition: CoreCommonUtil.cpp:29
GpgFrontend::FileOperator::CalculateHash
static std::string CalculateHash(const std::filesystem::path &file_path)
Definition: FileOperator.cpp:75
GpgFrontend::FileOperator::ReadFileStd
static bool ReadFileStd(const std::filesystem::path &file_name, std::string &data)
read file content using std struct
Definition: FileOperator.cpp:55
GpgFrontend::FileOperator
provides file operations
Definition: FileOperator.h:40
GpgFrontend::FileOperator::WriteFile
static bool WriteFile(const QString &file_name, const QByteArray &data)
write file content
Definition: FileOperator.cpp:43