|
Mantid
|
This Glob class uses the glob() method of Poco::Glob class to make it more reliable. More...
#include <Glob.h>
Static Public Member Functions | |
| static void | glob (const std::string &pathPattern, std::set< std::string > &files, int options=0) |
| Creates a set of files that match the given pathPattern. | |
| static std::string | globToRegex (const std::string &globPattern) |
| Convert a glob pattern to an equivalent regular expression. | |
Static Public Attributes | |
| static constexpr int | GLOB_CASELESS = 4 |
| static constexpr int | GLOB_DEFAULT = 0 |
| Glob option constants (compatible with Poco::Glob) | |
|
static |
Creates a set of files that match the given pathPattern.
The path may be give in either Unix, Windows or VMS syntax and is automatically expanded by calling Path::expand().
The pattern may contain wildcard expressions even in intermediate directory names (e.g. /usr/include/* /**.h).
Note that, for obvious reasons, escaping characters in a pattern with a backslash does not work in Windows-style paths.
Directories that for whatever reason cannot be traversed are ignored.
It seems that whatever bug Poco had is fixed now. So calling Poco::Glob::glob(pathPattern,files,options) inside.
| pathPattern | :: The search pattern as a string |
| files | :: The names of the files that match the pattern |
| options | :: Options |
Definition at line 35 of file Glob.cpp.
Referenced by Mantid::Algorithms::ClearCache::deleteFiles(), Mantid::Kernel::ConfigServiceImpl::getFullPath(), and Mantid::DataHandling::LoadRawHelper::searchForLogFiles().
|
static |
Convert a glob pattern to an equivalent regular expression.
This essentially converts non-escaped "*" to ".+" and non-escaped "?" to ".". This is how Poco's Glob module acts.
Definition at line 51 of file Glob.cpp.
Referenced by Mantid::Algorithms::GroupWorkspaces::addToGroup().
|
staticconstexpr |
Definition at line 30 of file Glob.h.
Referenced by Mantid::API::FileFinderImpl::setCaseSensitive().
|
staticconstexpr |
Glob option constants (compatible with Poco::Glob)
Definition at line 29 of file Glob.h.
Referenced by Mantid::API::FileFinderImpl::FileFinderImpl(), Mantid::API::FileFinderImpl::getCaseSensitive(), and Mantid::API::FileFinderImpl::setCaseSensitive().