+bool resource::find(const std::string& path)
+{
+ //std::string file = stlplus::lookup(path, search_paths_, ":");
+ //log_info("found file", file, "in", search_paths_);
+ //return !stlplus::lookup(path, search_paths_, ":").empty();
+ return find_file(path) != "";
+}
+
+std::string resource::find_file(const std::string& name)
+{
+ //log_info("looking for", name, "in", search_paths_);
+ //return stlplus::lookup(name, search_paths_, ":");
+
+ std::vector<std::string> paths;
+ boost::split(paths, search_paths_, boost::is_any_of(":"));
+
+ std::vector<std::string>::iterator it;
+ for (it = paths.begin(); it != paths.end(); ++it)
+ {
+ *it += "/";
+ *it += name;
+ log_info("looking for", name, "in", *it);
+ if (stlplus::file_exists(*it)) return *it;