GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
FileOperator.h
1 
29 #ifndef GPGFRONTEND_FILEOPERATOR_H
30 #define GPGFRONTEND_FILEOPERATOR_H
31 
32 #include "core/GpgFrontendCore.h"
33 
34 namespace GpgFrontend {
35 
40 class GPGFRONTEND_CORE_EXPORT FileOperator {
41  public:
50  static bool ReadFileStd(const std::filesystem::path &file_name,
51  std::string &data);
52 
60  static bool WriteFileStd(const std::filesystem::path &file_name,
61  const std::string &data);
62 
71  static bool ReadFile(const QString &file_name, QByteArray &data);
72 
81  static bool WriteFile(const QString &file_name, const QByteArray &data);
82 
88  static std::string CalculateHash(const std::filesystem::path &file_path);
89 };
90 } // namespace GpgFrontend
91 
92 #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:67
GpgFrontend
Definition: CoreCommonUtil.cpp:29
GpgFrontend::FileOperator::CalculateHash
static std::string CalculateHash(const std::filesystem::path &file_path)
Definition: FileOperator.cpp:72
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