7#ifndef IFW_CORE_UTILS_FILE_HPP_
8#define IFW_CORE_UTILS_FILE_HPP_
19 const std::string& extension);
29 std::string
LoadFile(
const std::string& filename,
30 std::string* complete_filename =
nullptr);
38 void SaveFile(
const std::string& filename,
39 const std::string& buffer,
40 const bool overwrite =
true);
std::string CheckAddExtension(const std::string &filename, const std::string &extension)
Check if filename has the specified extension (no initiating dot). If not, add it.
Definition file.cpp:19
std::string LoadFile(const std::string &filename, std::string *complete_filename)
Load a file and return the content.
Definition file.cpp:40
void CheckCreatePath(const std::string &path)
Check if the given path exists. If not, create it.
Definition file.cpp:91
void SaveFile(const std::string &filename, const std::string &buffer, const bool overwrite)
Save the contents inthe buffer into the given filename.
Definition file.cpp:63
void RemoveFile(const std::string &filename)
Remove the referenced file, if it exists.
Definition file.cpp:29