search for files in a list of directories
More...
#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/DirSearchPath.h>
|
typedef boost::filesystem::path | path |
|
search for files in a list of directories
- Author
- Paolo Calafiura pcala.nosp@m.fiur.nosp@m.a@lbl.nosp@m..gov - ATLAS Collaboration
Definition at line 29 of file DirSearchPath.h.
◆ path
◆ DirSearchPath() [1/2]
DirSearchPath::DirSearchPath |
( |
| ) |
|
|
inline |
◆ DirSearchPath() [2/2]
DirSearchPath::DirSearchPath |
( |
const std::string & |
stringifiedPath, |
|
|
const char * |
separator = ",:" |
|
) |
| |
- Exceptions
-
boost::filesystem::filesystem_error | |
Definition at line 40 of file DirSearchPath.cpp.
43 typedef tokenizer<char_separator<char>> Tokenizer;
45 Tokenizer tok( stringifiedPath, char_separator<char>( separator ) );
49 auto it = tok.begin();
50 while ( it != tok.end() ) {
54 }
catch ( boost::filesystem::filesystem_error& ) {}
◆ add()
bool DirSearchPath::add |
( |
const path & |
dir | ) |
|
◆ addCWD()
bool DirSearchPath::addCWD |
( |
| ) |
|
add current work dir (*nix pwd) to path
Definition at line 59 of file DirSearchPath.cpp.
59 {
return add( boost::filesystem::current_path() ); }
◆ existsDir() [1/2]
bool DirSearchPath::existsDir |
( |
const path & |
dir | ) |
|
|
static |
check dir path is valid
Definition at line 111 of file DirSearchPath.cpp.
111 {
return ( exists( dir ) && is_directory( dir ) ); }
◆ existsDir() [2/2]
bool DirSearchPath::existsDir |
( |
const std::string & |
dirName | ) |
|
|
static |
◆ find() [1/2]
bool DirSearchPath::find |
( |
const path & |
file, |
|
|
path & |
fileFound |
|
) |
| const |
returns a flag if file found in search path. Sets ref to completed path
Definition at line 80 of file DirSearchPath.cpp.
82 for (
const auto& iDir :
m_dirs ) {
84 if ( exists( full ) ) {
◆ find() [2/2]
returns a flag if fileName found in search path, and sets ref to fully qualified file name (in native form)
Definition at line 70 of file DirSearchPath.cpp.
74 if ( (
rc =
find(
path( fileName ), fileFound ) ) ) fullFileName = fileFound.
string();
◆ find_all()
returns lists of files found in search path.
Definition at line 94 of file DirSearchPath.cpp.
96 for (
const auto& iDir :
m_dirs ) {
98 if ( exists( full ) ) found.
push_back( full );
◆ m_dirs
The documentation for this class was generated from the following files: