3 #include "../../../../../core/error.h"
26 bool checkIfFolderExists(
const std::filesystem::path& mPath,
const std::filesystem::path& p);
28 void ensureFolderExists(
const std::filesystem::path& mPath,
const std::filesystem::path& p,
bool createIfNotExistent =
true);
30 bool checkIfFileExists(
const std::filesystem::path& mPath,
const std::filesystem::path& p);
32 void ensureFileExists(
const std::filesystem::path& mPath,
const std::filesystem::path& p);
34 void writeDataToFile(
const std::filesystem::path& mPath,
const std::filesystem::path& p,
const std::vector<unsigned char>&
data);
36 void writeDataToFileRepeated(
const std::filesystem::path& mPath,
const std::filesystem::path& p,
const std::vector<unsigned char>&
data,
const unsigned int maxTries = 100,
const unsigned int sleepTimeMs = 10);
38 std::vector<unsigned char>
readDataFromFile(
const std::filesystem::path& mPath,
const std::filesystem::path& p);
40 std::vector<std::string>
getAllDirectories(
const std::filesystem::path& mPath,
const std::filesystem::path& p);
42 std::vector<std::string>
getAllFiles(
const std::filesystem::path& mPath,
const std::filesystem::path& p);