8#include <boost/filesystem.hpp>
13 const auto temp_dir = boost::filesystem::temp_directory_path();
14 auto temp_full_path = temp_dir;
16 temp_full_path /= fileName;
21 if (boost::filesystem::is_directory(temp_dir)) {
25 throw std::invalid_argument(
"failed to load temp directory: " + temp_dir.generic_string());
35 if (boost::filesystem::is_regular_file(
m_full_path)) {
39 std::cout <<
"Debug file at: " <<
m_full_path <<
" not removed. " << std::endl;
void setDebugMode(bool mode)
std::string fullPath() const
FileResource(const std::string &fileName, bool debugMode=false)
boost::filesystem::path m_full_path