]> git.tdb.fi Git - libs/core.git/blobdiff - source/fs/dir.h
Prefer more cache-efficient containers
[libs/core.git] / source / fs / dir.h
index be5fac8662533b908cd720059e25deece28a81f4..c0a1c7460324f3163715d5c119b0fea701b3517e 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef MSP_FS_DIR_H_
 #define MSP_FS_DIR_H_
 
-#include <list>
 #include <stdexcept>
 #include <string>
+#include <vector>
 #include "path.h"
 
 namespace Msp {
@@ -29,10 +29,10 @@ void rmdir(const Path &path);
 void rmpath(const Path &path);
 
 /// Lists the contents of a directory
-std::list<std::string> list_files(const Path &path);
+std::vector<std::string> list_files(const Path &path);
 
 /// Lists the contents of a directory, filtered with a regex
-std::list<std::string> list_filtered(const Path &path, const std::string &filter);
+std::vector<std::string> list_filtered(const Path &path, const std::string &filter);
 
 /// Returns the current working directory
 Path getcwd();
@@ -57,7 +57,7 @@ Path get_sys_lib_dir();
 
 /** Looks for a file in a list of paths.  Returns the absolute path to the
 first existing location, or an empty Path if the file is not found at all. */
-Path path_lookup(const std::string &, const std::list<Path> &);
+Path path_lookup(const std::string &, const std::vector<Path> &);
 
 /** Looks for a file using the PATH environment variable. */
 Path path_lookup(const std::string &);