diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2014-06-19 18:26:17 +1000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-06-25 12:40:10 -0400 |
commit | d9a7d419b2858f5a2ce36ae5321c998d766be026 (patch) | |
tree | 5a2877a7f90a78845631dd026f1b3d9549f083e5 /libs/pbd/file_utils.cc | |
parent | 613162df6b1cc1f268c5f74504a28bfa46592f33 (diff) |
Change PBD::find_files_matching_regex and PBD::find_files_matching_filter to take a Searchpath
Diffstat (limited to 'libs/pbd/file_utils.cc')
-rw-r--r-- | libs/pbd/file_utils.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libs/pbd/file_utils.cc b/libs/pbd/file_utils.cc index c159e2718a..26900be289 100644 --- a/libs/pbd/file_utils.cc +++ b/libs/pbd/file_utils.cc @@ -203,7 +203,7 @@ regexp_filter (const string& str, void *arg) void find_files_matching_regex (vector<string>& result, - const std::string& dirpath, + const Searchpath& paths, const std::string& regexp) { int err; @@ -224,7 +224,7 @@ find_files_matching_regex (vector<string>& result, return; } - find_files_matching_filter (result, dirpath, + find_files_matching_filter (result, paths, regexp_filter, &compiled_pattern, true, true, false); @@ -233,7 +233,7 @@ find_files_matching_regex (vector<string>& result, void find_files_matching_filter (vector<string>& result, - const string &dirpath, + const Searchpath& paths, bool (*filter)(const string &, void *), void *arg, bool match_fullpath, bool return_fullpath, @@ -241,10 +241,7 @@ find_files_matching_filter (vector<string>& result, { vector<string> all_files; - Searchpath spath(dirpath); - - for (vector<string>::iterator i = spath.begin(); i != spath.end(); ++i) - { + for (vector<string>::const_iterator i = paths.begin(); i != paths.end(); ++i) { string expanded_path = path_expand (*i); get_directory_contents (expanded_path, all_files, true, recurse); } |