98e947f8a62a9a25c3200d6f3eb48b1d4a668fa8
[supertux.git] / lib / app / setup.h
1 //  $Id$
2 //
3 //  SuperTux -  A Jump'n Run
4 //  Copyright (C) 2000 Bill Kendrick <bill@newbreedsoftware.com>
5 //
6 //  This program is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU General Public License
8 //  as published by the Free Software Foundation; either version 2
9 //  of the License, or (at your option) any later version.
10 //
11 //  This program is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 //  GNU General Public License for more details.
15 //
16 //  You should have received a copy of the GNU General Public License
17 //  along with this program; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19
20 #ifndef SUPERTUX_SETUP_H
21 #define SUPERTUX_SETUP_H
22
23 #include <vector>
24 #include <set>
25 #include <string>
26
27 namespace SuperTux {
28
29 /// File system utility functions
30 struct FileSystem
31   {
32     static bool faccessible(const std::string& filename);
33     static bool fcreatedir(const std::string& relative_dir);
34     static bool fwriteable(const std::string& filename);
35     static std::set<std::string> read_directory(const std::string& pathname);
36     static std::set<std::string> dsubdirs(const std::string& rel_path, const std::string& expected_file);
37     static std::set<std::string> dfiles(const std::string& rel_path, const std::string& glob, const std::string& exception_str);
38
39     static std::string dirname(const std::string& filename);
40   };
41
42 } //namespace SuperTux
43
44 #endif /*SUPERTUX_SETUP_H*/
45