14 #include <boost/filesystem.hpp> 15 #include <boost/tokenizer.hpp> 23 :
std::runtime_error(
"file not found: " + p.string())
56 using tokenizer = boost::tokenizer<boost::char_separator<char>>;
57 boost::char_separator<char> seps(sep,
"", boost::keep_empty_tokens);
58 tokenizer dirs(lib, seps);
60 for (
const std::string& s: dirs)
75 for (
const std::string& s:
split(lib, sep))
91 for (
const std::string& s:
split(lib, sep))
122 if (file.is_absolute())
147 path p = dir / filename;
std::ostream & dump(std::ostream &ostr) const
path find_file(const path &file) const
Search a file.
std::vector< std::string > strings_type
self_t & push_front(const path &p)
void pop_current_directory()
path_list_type current_directory_
Current directory stack.
path find_in_search_path(const path &filename) const
Find file filename using include path.
path current_directory_get() const
not_found(const path &file)
static strings_type split(const std::string &lib, const char *sep)
Split lib at each occurrence of sep, return the list of components.
void push_cwd()
Push the working directory on the stack.
void push_current_directory(const path &p)
path_list_type search_path_
Inclusion path list.
boost::filesystem::path path
self_t & push_back(const path &p)
Manage sets of inclusion paths.