14 #include <boost/tokenizer.hpp>
24 std::string path =
"")
28 path = ::getenv(
"PATH");
31 "Environment variable PATH not found"));
35 using tokenizer = boost::tokenizer<boost::char_separator<char> >;
36 boost::char_separator<char> sep(
":");
37 tokenizer tok(path, sep);
38 for (tokenizer::iterator it = tok.begin(); it != tok.end(); ++it)
40 std::filesystem::path p = *it;
42 if (!::access(p.c_str(), X_OK))