36 void createDir(
const std::string& table)
const;
43 void renameDir(
const std::string& old_name,
const std::string& new_name)
const;
49 void deleteDir(
const std::string& table)
const;
58 std::string
dirPath(
const std::string& table,
bool create_if_missing =
false)
const;
66 std::string
filePath(
const std::string& table,
const std::string& filename)
const;
76 std::optional<std::string>
getFilePath(
const std::string& table,
const std::string& filename)
const;
84 bool removeFile(
const std::string& table,
const std::string& filename)
const;
Handle file management for record type files.
Definition fileunit.h:27
void deleteDir(const std::string &table) const
Delete table directory and its contents.
Definition fileunit.cpp:39
std::string dirPath(const std::string &table, bool create_if_missing=false) const
Fetch directory path string for a given table.
Definition fileunit.cpp:65
std::optional< std::string > getFilePath(const std::string &table, const std::string &filename) const
Fetch filename absolute path only if the file exists, else, return empty response.
Definition fileunit.cpp:45
void createDir(const std::string &table) const
Create a directory matching passed in table name.
Definition fileunit.cpp:17
bool removeFile(const std::string &table, const std::string &filename) const
Remove existing file given the table and filename.
Definition fileunit.cpp:80
std::string filePath(const std::string &table, const std::string &filename) const
Fetch absolute path to where file is or would be for a given table and filename.
Definition fileunit.cpp:75
void renameDir(const std::string &old_name, const std::string &new_name) const
Rename existing directory if found or create it if not found.
Definition fileunit.cpp:27
router.h
Definition app.h:31