Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
556c435e
Commit
556c435e
authored
8 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Core/Tools/FileSystem.cpp
+1
-1
1 addition, 1 deletion
Core/Tools/FileSystem.cpp
Core/Tools/FileSystem.h
+1
-1
1 addition, 1 deletion
Core/Tools/FileSystem.h
Tests/Functional/PyCore/persistence/PyPersistenceTest.cpp
+2
-2
2 additions, 2 deletions
Tests/Functional/PyCore/persistence/PyPersistenceTest.cpp
with
4 additions
and
4 deletions
Core/Tools/FileSystem.cpp
+
1
−
1
View file @
556c435e
...
...
@@ -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
::
re
glob
(
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
))
...
...
This diff is collapsed.
Click to expand it.
Core/Tools/FileSystem.h
+
1
−
1
View file @
556c435e
...
...
@@ -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
>
re
glob
(
BA_CORE_API_
std
::
vector
<
std
::
string
>
glob
(
const
std
::
string
&
dir
,
const
std
::
string
&
pattern
);
}
// namespace FileSystem
...
...
This diff is collapsed.
Click to expand it.
Tests/Functional/PyCore/persistence/PyPersistenceTest.cpp
+
2
−
2
View file @
556c435e
...
...
@@ -38,7 +38,7 @@ bool PyPersistenceTest::runTest()
{
// Remove old output
for
(
const
std
::
string
&
fname
:
FileSystem
::
re
glob
(
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
::
re
glob
(
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
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment