Skip to content
Snippets Groups Projects
Commit 556c435e authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

function name "reglob" is a somewhat cryptic -> renamed to glob.

parent 8578a634
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,7 @@ std::string FileSystem::filename(const std::string& path)
}
//! Returns file names that agree with a regex glob pattern.
std::vector<std::string> FileSystem::reglob(const std::string& dir, const std::string& pattern)
std::vector<std::string> FileSystem::glob(const std::string& dir, const std::string& pattern)
{
std::vector<std::string> ret;
for (const std::string& fname: filesInDirectory(dir))
......
......@@ -40,7 +40,7 @@ namespace FileSystem {
BA_CORE_API_ std::string filename(const std::string& path);
//! Returns file names that agree with a regex glob pattern.
BA_CORE_API_ std::vector<std::string> reglob(
BA_CORE_API_ std::vector<std::string> glob(
const std::string& dir, const std::string& pattern);
} // namespace FileSystem
......
......@@ -38,7 +38,7 @@ bool PyPersistenceTest::runTest()
{
// Remove old output
for (const std::string& fname:
FileSystem::reglob(PYPERSIST_OUT_DIR, getName()+"\\.\\w+\\..+")) {
FileSystem::glob(PYPERSIST_OUT_DIR, getName()+"\\.\\w+\\..+")) {
std::remove( fname.c_str() );
std::cout << "Removed old output " << fname.c_str() << "\n";
}
......@@ -75,7 +75,7 @@ std::map<const std::string, const std::string>
PyPersistenceTest::glob2map(const std::string& dir, const std::string& stem)
{
std::map<const std::string, const std::string> ret;
for (const std::string& fname: FileSystem::reglob(dir, stem+"\\.\\w+\\..+")) {
for (const std::string& fname: FileSystem::glob(dir, stem+"\\.\\w+\\..+")) {
std::vector<std::string> fname_segments =
Utils::String::split(FileSystem::filename(fname), ".");
ret.insert(make_pair(fname_segments[1]+"."+fname_segments[2], fname));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment