X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Ffs%2Fdir.h;h=bef89c6d72e1e160072be098450c8641bb0ec00a;hp=be5fac8662533b908cd720059e25deece28a81f4;hb=991fabc1956b73a4007859058fb44171000b452e;hpb=817e584903996a041692640720a5a272d847a3c7 diff --git a/source/fs/dir.h b/source/fs/dir.h index be5fac8..bef89c6 100644 --- a/source/fs/dir.h +++ b/source/fs/dir.h @@ -1,9 +1,9 @@ #ifndef MSP_FS_DIR_H_ #define MSP_FS_DIR_H_ -#include #include #include +#include #include "path.h" namespace Msp { @@ -13,7 +13,7 @@ class not_a_directory: public std::runtime_error { public: not_a_directory(const Path &); - virtual ~not_a_directory() throw() { } + ~not_a_directory() throw() override = default; }; /// Creates a directory @@ -29,10 +29,10 @@ void rmdir(const Path &path); void rmpath(const Path &path); /// Lists the contents of a directory -std::list list_files(const Path &path); +std::vector list_files(const Path &path); /// Lists the contents of a directory, filtered with a regex -std::list list_filtered(const Path &path, const std::string &filter); +std::vector 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_lookup(const std::string &, const std::vector &); /** Looks for a file using the PATH environment variable. */ Path path_lookup(const std::string &);