3#include "../../../../../core/error.h"
24 bool createIfNotExistent =
true);
27 const std::filesystem::path& p);
30 const std::filesystem::path& p,
31 bool createIfNotExistent =
true);
33 bool checkIfFileExists(
const std::filesystem::path& mPath,
const std::filesystem::path& p);
35 void ensureFileExists(
const std::filesystem::path& mPath,
const std::filesystem::path& p);
38 const std::filesystem::path& p,
39 const std::vector<unsigned char>&
data);
42 const std::filesystem::path& p,
43 const std::vector<unsigned char>&
data,
44 const unsigned int maxTries = 100,
45 const unsigned int sleepTimeMs = 10);
47 std::vector<unsigned char>
readDataFromFile(
const std::filesystem::path& mPath,
48 const std::filesystem::path& p);
51 const std::filesystem::path& p);
53 std::vector<std::string>
getAllFiles(
const std::filesystem::path& mPath,
54 const std::filesystem::path& p);
const std::string DATA_FILENAME
const std::string TYPE_FILENAME
const std::string METADATA_FILENAME
bool checkIfFolderExists(const std::filesystem::path &mPath, const std::filesystem::path &p)
bool checkIfBasePathExists(const std::filesystem::path &mPath)
std::vector< std::string > getAllDirectories(const std::filesystem::path &mPath, const std::filesystem::path &p)
void ensureBasePathExists(const std::filesystem::path &mPath, bool createIfNotExistent)
std::vector< std::string > getAllFiles(const std::filesystem::path &mPath, const std::filesystem::path &p)
bool checkIfFileExists(const std::filesystem::path &mPath, const std::filesystem::path &p)
void ensureFolderExists(const std::filesystem::path &mPath, const std::filesystem::path &p, bool createIfNotExistent)
std::vector< unsigned char > readDataFromFile(const std::filesystem::path &mPath, const std::filesystem::path &p)
bool isNumber(const std::string &s)
void writeDataToFile(const std::filesystem::path &mPath, const std::filesystem::path &p, const std::vector< unsigned char > &data)
void ensureFileExists(const std::filesystem::path &mPath, const std::filesystem::path &p)
void writeDataToFileRepeated(const std::filesystem::path &mPath, const std::filesystem::path &p, const std::vector< unsigned char > &data, const unsigned int maxTries, const unsigned int sleepTimeMs)