diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2014-06-17 11:32:51 +1000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2014-06-17 21:13:50 +1000 |
commit | cde8776e8014a84b9e9feb860b537679daeb1aaf (patch) | |
tree | 796037946104c8f9385395bf56d67b86b7386677 /libs | |
parent | 3066bd48da29c84e9a491b809c81d512babd869c (diff) |
Rename PathScanner::run_scan_internal to PathScanner::find_files_matching_filter
Diffstat (limited to 'libs')
-rw-r--r-- | libs/pbd/pathscanner.cc | 35 | ||||
-rw-r--r-- | libs/pbd/pbd/pathscanner.h | 24 |
2 files changed, 27 insertions, 32 deletions
diff --git a/libs/pbd/pathscanner.cc b/libs/pbd/pathscanner.cc index 29c339c087..eb19c08fe9 100644 --- a/libs/pbd/pathscanner.cc +++ b/libs/pbd/pathscanner.cc @@ -78,10 +78,10 @@ PathScanner::find_files_matching_regex (vector<string>& result, return; } - run_scan_internal (result, dirpath, - regexp_filter, &compiled_pattern, - match_fullpath, return_fullpath, - limit, recurse); + find_files_matching_filter (result, dirpath, + regexp_filter, &compiled_pattern, + match_fullpath, return_fullpath, + limit, recurse); regfree (&compiled_pattern); } @@ -105,13 +105,13 @@ PathScanner::operator() (const string &dirpath, const string ®exp, } void -PathScanner::run_scan_internal (vector<string>& result, - const string &dirpath, - bool (*filter)(const string &, void *), - void *arg, - bool match_fullpath, bool return_fullpath, - long limit, - bool recurse) +PathScanner::find_files_matching_filter (vector<string>& result, + const string &dirpath, + bool (*filter)(const string &, void *), + void *arg, + bool match_fullpath, bool return_fullpath, + long limit, + bool recurse) { DIR *dir; struct dirent *finfo; @@ -149,7 +149,7 @@ PathScanner::run_scan_internal (vector<string>& result, } if (statbuf.st_mode & S_IFDIR && recurse) { - run_scan_internal (result, fullpath, filter, arg, match_fullpath, return_fullpath, limit, recurse); + find_files_matching_filter (result, fullpath, filter, arg, match_fullpath, return_fullpath, limit, recurse); } else { if (match_fullpath) { @@ -205,14 +205,9 @@ PathScanner::find_first (const string &dirpath, bool return_fullpath) { vector<string> res; - string ret; - - run_scan_internal (res, - dirpath, - filter, - 0, - match_fullpath, - return_fullpath, 1); + + find_files_matching_filter (res, dirpath, filter, 0, + match_fullpath, return_fullpath, 1); if (res.size() == 0) { return string(); diff --git a/libs/pbd/pbd/pathscanner.h b/libs/pbd/pbd/pathscanner.h index d97cbb7693..28ff2c5dcb 100644 --- a/libs/pbd/pbd/pathscanner.h +++ b/libs/pbd/pbd/pathscanner.h @@ -42,10 +42,10 @@ class LIBPBD_API PathScanner long limit = -1, bool recurse = false) { std::vector<std::string> result; - run_scan_internal (result, dirpath, - filter, arg, - match_fullpath, return_fullpath, - limit, recurse); + find_files_matching_filter (result, dirpath, + filter, arg, + match_fullpath, return_fullpath, + limit, recurse); return result; } @@ -77,14 +77,14 @@ class LIBPBD_API PathScanner long limit, bool recurse = false); - void run_scan_internal (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); + 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); }; #endif // __libmisc_pathscanner_h__ |