6 #include <boost/algorithm/string.hpp>
12 std::tuple<std::filesystem::path, std::string>
getLocation (
const std::string& location)
15 namespace al = boost::algorithm;
16 namespace fs = filesystem;
19 al::split(words, location, al::is_any_of(
":"), al::token_compress_on);
20 if (words.size() != 2)
21 BOOST_THROW_EXCEPTION( invalid_argument(
"Expecting `/path/to/file.ext:histname`") );
22 fs::path filename = words.front();
23 string histname = words.back();
24 return {filename, histname};