summaryrefslogtreecommitdiff
path: root/libs/pbd/pbd/file_utils.h
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2014-06-22 19:58:19 +1000
committerPaul Davis <paul@linuxaudiosystems.com>2014-06-25 12:40:11 -0400
commit3b1a98f0ecd8de35b29d9429849c3caf7afac921 (patch)
treee9d9ccf82c583e90e427744c05a5c358a73060ea /libs/pbd/pbd/file_utils.h
parent6d0cce528e29fa1a850f616eda0b09b424f760ec (diff)
Change PBD::get_files and PBD::get_paths to take a Searchpath instead of directory path
Both these functions use the internal function run_functor_for_paths which takes a Searchpath so this avoids a temporary variable in cases where a Searchpath is passed directly. The usage is the same as the compiler will generate a temporary Searchpath from a string(directory path) if necessary.
Diffstat (limited to 'libs/pbd/pbd/file_utils.h')
-rw-r--r--libs/pbd/pbd/file_utils.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/pbd/pbd/file_utils.h b/libs/pbd/pbd/file_utils.h
index 52436d1234..9ef5374a0a 100644
--- a/libs/pbd/pbd/file_utils.h
+++ b/libs/pbd/pbd/file_utils.h
@@ -35,28 +35,28 @@ namespace PBD {
* if recursing.
* @note paths in result will be absolute
*
- * @param path An absolute path to a directory in the filename encoding
* @param result A vector of absolute paths to the directory entries in filename
* encoding.
+ * @param paths A Searchpath
* @param files_only Only include file entries in result
* @param recurse Recurse into child directories
*/
LIBPBD_API void
get_paths (std::vector<std::string>& result,
- const std::string& directory_path,
+ const Searchpath& paths,
bool files_only = true,
bool recurse = false);
/**
- * Get a list of files in a directory.
+ * Get a list of files in a Searchpath.
* @note paths in result will be absolute.
*
- * @param path An Absolute path to a directory
+ * @param path A Searchpath
* @param result A vector of paths to files.
*/
LIBPBD_API void
get_files (std::vector<std::string>& result,
- const std::string& path);
+ const Searchpath& paths);
/**
* Takes a Searchpath and returns all the files contained in the