1 ////////////////////////////////////////////////////////////////////////////////
2 //    Scorched3D (c) 2000-2011
3 //
4 //    This file is part of Scorched3D.
5 //
6 //    Scorched3D is free software; you can redistribute it and/or modify
7 //    it under the terms of the GNU General Public License as published by
8 //    the Free Software Foundation; either version 2 of the License, or
9 //    (at your option) any later version.
10 //
11 //    Scorched3D 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 along
17 //    with this program; if not, write to the Free Software Foundation, Inc.,
18 //    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 ////////////////////////////////////////////////////////////////////////////////
20 
21 #ifndef __DEFINESFILE__
22 #define __DEFINESFILE__
23 
24 #include <time.h>
25 #include <string>
26 
27 namespace S3D
28 {
29 	enum FileLocation
30 	{
31 		eInvalidLocation = 0,
32 		eAbsLocation,
33 		eDataLocation,
34 		eModLocation
35 	};
36 
37 	void fileDos2Unix(std::string &file);
38 	bool fileExists(const std::string &file);
39 	bool dirExists(const std::string &file);
40 	bool dirMake(const std::string &file);
41 	bool removeFile(const std::string &file);
42 	const std::string getLocation(FileLocation imageLocation, const std::string &filename);
43 	time_t fileModTime(const std::string &file);
44 	std::string getHomeDir();
45 	std::string getOSDesc();
46 }
47 
48 #endif // __DEFINESFILE__
49