Add function PBD::find_paths_matching_filter
This commit is contained in:
parent
54c0a0144c
commit
24599c552d
|
@ -289,6 +289,17 @@ find_files_matching_regex (vector<string>& result,
|
|||
regfree (&compiled_pattern);
|
||||
}
|
||||
|
||||
void
|
||||
find_paths_matching_filter (vector<string>& result,
|
||||
const Searchpath& paths,
|
||||
bool (*filter)(const string &, void *),
|
||||
void *arg,
|
||||
bool match_fullpath, bool return_fullpath,
|
||||
bool recurse)
|
||||
{
|
||||
run_functor_for_paths (result, paths, filter, arg, false, match_fullpath, return_fullpath, recurse);
|
||||
}
|
||||
|
||||
void
|
||||
find_files_matching_filter (vector<string>& result,
|
||||
const Searchpath& paths,
|
||||
|
|
|
@ -109,6 +109,19 @@ find_files_matching_regex (std::vector<std::string>& results,
|
|||
const Searchpath& dirpath,
|
||||
const std::string& regexp);
|
||||
|
||||
/**
|
||||
* @return paths in a Searchpath that match a supplied filter(functor)
|
||||
* @note results include files and directories
|
||||
*/
|
||||
LIBPBD_API void
|
||||
find_paths_matching_filter (std::vector<std::string>&,
|
||||
const Searchpath& paths,
|
||||
bool (*filter)(const std::string &, void *),
|
||||
void *arg,
|
||||
bool match_fullpath,
|
||||
bool return_fullpath,
|
||||
bool recurse = false);
|
||||
|
||||
/**
|
||||
* @return files in a Searchpath that match a supplied filter(functor)
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user