Initial integration, lots of broken stuff
[supertux.git] / src / unison / include / unison / vfs / FileSystem.hpp
1 //          Copyright Timothy Goya 2007.
2 // Distributed under the Boost Software License, Version 1.0.
3 //    (See accompanying file LICENSE_1_0.txt or copy at
4 //          http://www.boost.org/LICENSE_1_0.txt)
5
6 #ifndef UNISON_VFS_FILE_SYSTEM_HPP
7 #define UNISON_VFS_FILE_SYSTEM_HPP
8
9 #include <string>
10 #include <vector>
11
12 namespace Unison
13 {
14    namespace VFS
15    {
16       class FileSystem
17       {
18          public:
19             static FileSystem &get()
20             {
21                static FileSystem vfs;
22                return vfs;
23             }
24
25             void follow_sym_links(bool follow);
26
27             std::string get_dir_sep();
28             std::string get_base_dir();
29             std::string get_user_dir();
30
31             std::string get_write_dir();
32             void set_write_dir(const std::string &write_dir);
33
34             void mount(const std::string &path, const std::string &mount_point = "/", bool append = false);
35             void umount(const std::string &path);
36             std::vector<std::string> get_search_path();
37             std::string get_mount_point(const std::string &path);
38
39             void mkdir(const std::string &dir);
40             void rm(const std::string &filename);
41             std::vector<std::string> ls(const std::string &path);
42             bool exists(const std::string &filename);
43             bool is_dir(const std::string &filename);
44
45             std::string get_real_dir(const std::string &filename);
46          private:
47             FileSystem();
48             ~FileSystem();
49       };
50    }
51 }
52
53 #endif