1 #ifndef JOBOPTIONS_DIRSEARCHPATH_H
2 #define JOBOPTIONS_DIRSEARCHPATH_H
10 #include "boost/filesystem/path.hpp"
11 #include "boost/filesystem/exception.hpp"
12 #include "GaudiKernel/Kernel.h"
26 DirSearchPath(
const std::string& stringifiedPath,
const char* separator=
",;");
28 DirSearchPath(
const std::string& stringifiedPath,
const char* separator=
",:");
35 bool add(
const path& dir);
41 bool find(
const std::string& fileName, std::string& fullFileName)
const;
45 bool find(
const path&
file, path& fileFound)
const;
47 std::list<path> find_all(
const path&
file)
const;
53 static bool existsDir(
const std::string& dirName);
54 static bool existsDir(
const path& dir);
60 struct eqPath :
public std::unary_function<const path&,bool> {
61 eqPath(
const path& ref) : m_ref(ref) {}
62 bool operator() (
const path& p)
const {
63 return p.string() == m_ref.string();
79 std::vector<path> m_dirs;
81 #endif // JOBOPTIONS_DIRSEARCHPATH_H
search for files in a list of directories