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)
Exception thrown when a file cannot be located.
path_list_type current_directory_
Current directory stack.
void push_current_directory(const path &p)
std::list< std::string > strings_type
path absolute(const path &p)
path find_in_search_path(const path &filename) const
Find file filename using include path.
bool exists(const path &p)
std::ostream & dump(std::ostream &ostr) const
path find_file(const path &file) const
Search a file.
not_found(const path &file)
void pop_current_directory()
self_t & push_back(const path &p)
void push_cwd()
Push the working directory on the stack.
path current_directory_get() const
Manage sets of inclusion paths.
path_list_type search_path_
Inclusion path list.
static strings_type split(const std::string &lib, const char *sep)
Split lib at each occurrence of sep, return the list of components.
static path cwd()
Return the current working directory.
Paths in filesystems, i.e., file names.