#include "file_utils.h" #include "lib/os/os.h" #include "bts_assert.h" #include #include #include namespace bts { namespace utils { bool create_if_not_there (std::string const &path) { if (!boost::filesystem::exists (path)) { bts_assert_msg (boost::filesystem::create_directories (path), "Unable to create directory"); return false; } else return true; } std::string normalize_data_path (std::string const &input_path) { std::string result (input_path); boost::algorithm::replace_first (result,"$data_path", os::bts_data_path ()); return result; } }}