]> git.tdb.fi Git - libs/core.git/blobdiff - source/dir.h
Split directory and stat related functions into their own files
[libs/core.git] / source / dir.h
diff --git a/source/dir.h b/source/dir.h
new file mode 100644 (file)
index 0000000..25ec776
--- /dev/null
@@ -0,0 +1,46 @@
+/* $Id$
+
+This file is part of libmspfs
+Copyright © 2006-2008  Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
+#ifndef MSP_FS_DIR_H_
+#define MSP_FS_DIR_H_
+
+#include <list>
+#include <string>
+
+namespace Msp {
+namespace FS {
+
+class Path;
+
+/// Creates a directory
+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
+void rmdir(const Path &path);
+
+/// Removes a directory and anything it contains
+void rmdirs(const Path &path);
+
+/// Lists the contents of a directory
+std::list<std::string> list_files(const Path &path);
+
+/// Returns the current working directory
+Path getcwd();
+
+/// Returns the user's home directory
+Path get_home_dir();
+
+/// Changes the current working directory
+void chdir(const Path &);
+
+} // namespace FS
+} // namespace Msp
+
+#endif