diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2014-06-24 11:16:38 +1000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-06-25 12:40:11 -0400 |
commit | 6d0cce528e29fa1a850f616eda0b09b424f760ec (patch) | |
tree | 4a82709d379d262eabf5fd598a78502863d0a1c6 /libs/pbd/pbd | |
parent | 851db83fc46ebe41f1b88503895be6e0436d5a6f (diff) |
Add/Update docs in pbd/file_utils.h
Diffstat (limited to 'libs/pbd/pbd')
-rw-r--r-- | libs/pbd/pbd/file_utils.h | 45 |
1 files changed, 36 insertions, 9 deletions
diff --git a/libs/pbd/pbd/file_utils.h b/libs/pbd/pbd/file_utils.h index 435b8920a9..52436d1234 100644 --- a/libs/pbd/pbd/file_utils.h +++ b/libs/pbd/pbd/file_utils.h @@ -93,6 +93,11 @@ find_files_matching_pattern (std::vector<std::string>& result, * Takes a search path and a file name and places the full path * to that file in result if it is found within the search path. * + * @note the parameter order of this function doesn't match the + * others. At the time of writing it is the most widely used file + * utility function so I didn't change it but it may be worth + * doing at some point if it causes any confusion. + * * @return true If file is found within the search path. */ LIBPBD_API bool @@ -102,35 +107,57 @@ find_file (const Searchpath& search_path, /** - * @return files in dirpath that match a regular expression + * Find files in paths that match a regular expression + * @note This function does not recurse. + * + * @param result A vector in which to place the resulting matches. + * @param paths A Searchpath + * @param regexp A regular expression */ LIBPBD_API void find_files_matching_regex (std::vector<std::string>& results, - const Searchpath& dirpath, + const Searchpath& paths, const std::string& regexp); /** - * @return paths in a Searchpath that match a supplied filter(functor) - * @note results include files and directories + * Find paths in a Searchpath that match a supplied filter(functor) + * @note results include files and directories. + * + * @param result A vector in which to place the resulting matches. + * @param paths A Searchpath + * @param filter A functor to use to filter paths + * @param arg additonal argument to filter if required + * @param pass_fullpath pass the full path to the filter or just the basename + * @param return_fullpath put the full path in results or just the basename + * @param recurse Recurse into child directories to find paths. */ LIBPBD_API void -find_paths_matching_filter (std::vector<std::string>&, +find_paths_matching_filter (std::vector<std::string>& results, const Searchpath& paths, bool (*filter)(const std::string &, void *), void *arg, - bool match_fullpath, + bool pass_fullpath, bool return_fullpath, bool recurse = false); /** - * @return files in a Searchpath that match a supplied filter(functor) + * Find paths in a Searchpath that match a supplied filter(functor) + * @note results include only files. + * + * @param result A vector in which to place the resulting matches. + * @param paths A Searchpath + * @param filter A functor to use to filter paths + * @param arg additonal argument to filter if required + * @param pass_fullpath pass the full path to the filter or just the basename + * @param return_fullpath put the full path in results or just the basename + * @param recurse Recurse into child directories to find files. */ LIBPBD_API void -find_files_matching_filter (std::vector<std::string>&, +find_files_matching_filter (std::vector<std::string>& results, const Searchpath& paths, bool (*filter)(const std::string &, void *), void *arg, - bool match_fullpath, + bool pass_fullpath, bool return_fullpath, bool recurse = false); |