diff options
author | Robin Gareus <robin@gareus.org> | 2015-03-03 16:41:44 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-03-03 19:54:27 +0100 |
commit | cf7d5dbc2dabb2e0207da44ca92dccb30e8fabdb (patch) | |
tree | f3d45b7ca13b6e157d33472e49790fa7c8fa9540 /libs/pbd | |
parent | a173c74f2daed04a8722bf600c8e9f9ed03dabe8 (diff) |
recursive regexp file search.
Diffstat (limited to 'libs/pbd')
-rw-r--r-- | libs/pbd/file_utils.cc | 5 | ||||
-rw-r--r-- | libs/pbd/pbd/file_utils.h | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/libs/pbd/file_utils.cc b/libs/pbd/file_utils.cc index 9523fdd6bd..a15cd04cd4 100644 --- a/libs/pbd/file_utils.cc +++ b/libs/pbd/file_utils.cc @@ -225,7 +225,8 @@ regexp_filter (const string& str, void *arg) void find_files_matching_regex (vector<string>& result, const Searchpath& paths, - const std::string& regexp) + const std::string& regexp, + bool recurse) { int err; char msg[256]; @@ -250,7 +251,7 @@ find_files_matching_regex (vector<string>& result, find_files_matching_filter (result, paths, regexp_filter, &compiled_pattern, - true, true, false); + true, true, recurse); regfree (&compiled_pattern); } diff --git a/libs/pbd/pbd/file_utils.h b/libs/pbd/pbd/file_utils.h index 7a9cb68318..bd22f341d8 100644 --- a/libs/pbd/pbd/file_utils.h +++ b/libs/pbd/pbd/file_utils.h @@ -117,7 +117,8 @@ find_file (const Searchpath& search_path, LIBPBD_API void find_files_matching_regex (std::vector<std::string>& results, const Searchpath& paths, - const std::string& regexp); + const std::string& regexp, + bool recurse = false); /** * Find paths in a Searchpath that match a supplied filter(functor) |