mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Add a variation of PBD::find_files_matching_pattern for convenience
This commit is contained in:
parent
077c09b105
commit
36fd67ab72
2 changed files with 27 additions and 0 deletions
|
|
@ -137,6 +137,15 @@ find_files_matching_pattern (vector<string>& result,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
find_files_matching_pattern (vector<string>& result,
|
||||||
|
const Searchpath& paths,
|
||||||
|
const string& pattern)
|
||||||
|
{
|
||||||
|
Glib::PatternSpec tmp(pattern);
|
||||||
|
find_files_matching_pattern (result, paths, tmp);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
find_matching_files_in_directory (const std::string& directory,
|
find_matching_files_in_directory (const std::string& directory,
|
||||||
const Glib::PatternSpec& pattern,
|
const Glib::PatternSpec& pattern,
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,24 @@ find_files_matching_pattern (std::vector<std::string>& result,
|
||||||
const Searchpath& paths,
|
const Searchpath& paths,
|
||||||
const Glib::PatternSpec& pattern);
|
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
|
* Takes a directory path and returns all the files in the directory
|
||||||
* matching a particular pattern.
|
* matching a particular pattern.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue