diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2014-06-19 20:09:10 +1000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-06-25 12:40:10 -0400 |
commit | 36fd67ab72866c9c049d8210d2d345d2adc4e7a6 (patch) | |
tree | afca031c1ad0aec55dbe8e8a7c9cb5ebbd2d5c16 /libs/pbd/pbd/file_utils.h | |
parent | 077c09b1055d183834c61ead6cd506302ce838e4 (diff) |
Add a variation of PBD::find_files_matching_pattern for convenience
Diffstat (limited to 'libs/pbd/pbd/file_utils.h')
-rw-r--r-- | libs/pbd/pbd/file_utils.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libs/pbd/pbd/file_utils.h b/libs/pbd/pbd/file_utils.h index 3ced02f2aa..588e48217a 100644 --- a/libs/pbd/pbd/file_utils.h +++ b/libs/pbd/pbd/file_utils.h @@ -72,6 +72,24 @@ find_files_matching_pattern (std::vector<std::string>& result, const Glib::PatternSpec& pattern); /** + * Takes a Searchpath and returns all the files contained in the + * directory paths that match a particular pattern. + * + * This is a convenience method to avoid explicitly declaring + * temporary variables such as: + * find_files_matching_pattern (result, paths, string("*.ext")) + * + * @param result A vector in which to place the resulting matches. + * @param paths A Searchpath + * @param pattern A string representing the Glib::PatternSpec used + * to match the files. + */ +LIBPBD_API void +find_files_matching_pattern (std::vector<std::string>& result, + const Searchpath& paths, + const std::string& pattern); + +/** * Takes a directory path and returns all the files in the directory * matching a particular pattern. * |