]> git.tdb.fi Git - libs/core.git/blobdiff - source/dir.h
Refactor the API
[libs/core.git] / source / dir.h
index 25ec776b2b814f4616e32f9a83d59ebe18d3bb6e..3b68463ec36f37f5944ff63a65d54191b18d915f 100644 (file)
@@ -22,21 +22,27 @@ void mkdir(const Path &path, int mode);
 /// Creates a directory and any required parent directories
 void mkpath(const Path &path, int mode);
 
-/// Removes a directory
+/// Removes a directory, which must be empty
 void rmdir(const Path &path);
 
 /// Removes a directory and anything it contains
-void rmdirs(const Path &path);
+void rmpath(const Path &path);
 
 /// Lists the contents of a directory
 std::list<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);
+
 /// Returns the current working directory
 Path getcwd();
 
 /// Returns the user's home directory
 Path get_home_dir();
 
+/// Returns a directory suitable for storing user-specific data
+Path get_user_data_dir(const std::string &appname);
+
 /// Changes the current working directory
 void chdir(const Path &);