]> git.tdb.fi Git - libs/core.git/blob - source/dir.h
25ec776b2b814f4616e32f9a83d59ebe18d3bb6e
[libs/core.git] / source / dir.h
1 /* $Id$
2
3 This file is part of libmspfs
4 Copyright © 2006-2008  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_FS_DIR_H_
9 #define MSP_FS_DIR_H_
10
11 #include <list>
12 #include <string>
13
14 namespace Msp {
15 namespace FS {
16
17 class Path;
18
19 /// Creates a directory
20 void mkdir(const Path &path, int mode);
21
22 /// Creates a directory and any required parent directories
23 void mkpath(const Path &path, int mode);
24
25 /// Removes a directory
26 void rmdir(const Path &path);
27
28 /// Removes a directory and anything it contains
29 void rmdirs(const Path &path);
30
31 /// Lists the contents of a directory
32 std::list<std::string> list_files(const Path &path);
33
34 /// Returns the current working directory
35 Path getcwd();
36
37 /// Returns the user's home directory
38 Path get_home_dir();
39
40 /// Changes the current working directory
41 void chdir(const Path &);
42
43 } // namespace FS
44 } // namespace Msp
45
46 #endif