summaryrefslogtreecommitdiff
path: root/libs/pbd/pbd/file_utils.h
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2014-06-17 12:16:37 +1000
committerTim Mayberry <mojofunk@gmail.com>2014-06-17 21:19:02 +1000
commitdc81ab8640107086c71b910c0a5d9c12f873d27d (patch)
tree5bce66e5aa4f9d05edd77286ffbca5e924ba2b4a /libs/pbd/pbd/file_utils.h
parentea5f9a8ea62f774258cd056e61e61648f91fe46e (diff)
Move member functions from PathScanner to functions in pbd/file_utils.h
This allows us to remove PathScanner source file and keep PathScanner class as header only until it is removed
Diffstat (limited to 'libs/pbd/pbd/file_utils.h')
-rw-r--r--libs/pbd/pbd/file_utils.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/libs/pbd/pbd/file_utils.h b/libs/pbd/pbd/file_utils.h
index 01ff8606a7..51fb2c1ad1 100644
--- a/libs/pbd/pbd/file_utils.h
+++ b/libs/pbd/pbd/file_utils.h
@@ -92,6 +92,32 @@ find_file_in_search_path (const Searchpath& search_path,
const std::string& filename,
std::string& result);
+
+/**
+ * @return files in dirpath that match a regular expression
+ */
+LIBPBD_API void
+find_files_matching_regex (std::vector<std::string>& results,
+ const std::string& dirpath,
+ const std::string& regexp,
+ bool match_fullpath,
+ bool return_fullpath,
+ long limit,
+ bool recurse = false);
+
+/**
+ * @return files in dirpath that match a supplied filter(functor)
+ */
+LIBPBD_API void
+find_files_matching_filter (std::vector<std::string>&,
+ const std::string &dirpath,
+ bool (*filter)(const std::string &, void *),
+ void *arg,
+ bool match_fullpath,
+ bool return_fullpath,
+ long limit,
+ bool recurse = false);
+
/**
* Attempt to copy the contents of the file from_path to a new file
* at path to_path. If to_path exists it is overwritten.