14 #include <boost/tokenizer.hpp>
22 :
std::runtime_error(
"file not found: " + p.string())
55 using tokenizer = boost::tokenizer<boost::char_separator<char>>;
56 boost::char_separator<char> seps(sep,
"", boost::keep_empty_tokens);
57 tokenizer dirs(lib, seps);
59 for (
const std::string& s: dirs)
74 for (
const std::string& s:
split(lib, sep))
90 for (
const std::string& s:
split(lib, sep))
121 if (file.is_absolute())
146 path p = dir / filename;
self_t & push_front(const path &p)
std::list< std::string > strings_type
path absolute(const path &p)
static path cwd()
Return the current working directory.
bool exists(const path &p)
path find_in_search_path(const path &filename) const
Find file filename using include path.
void push_current_directory(const path &p)
void pop_current_directory()
path_list_type current_directory_
Current directory stack.
path find_file(const path &file) const
Search a file.
Exception thrown when a file cannot be located.
Paths in filesystems, i.e., file names.
self_t & push_back(const path &p)
path_list_type search_path_
Inclusion path list.
std::ostream & dump(std::ostream &ostr) const
not_found(const path &file)
Manage sets of inclusion paths.
path current_directory_get() const
void push_cwd()
Push the working directory on the stack.
static strings_type split(const std::string &lib, const char *sep)
Split lib at each occurrence of sep, return the list of components.