/* filesystem/filesystem.cc This file is part of the Osirion project and is distributed under the terms of the GNU General Public License version 2 */ // project headers #include "filesystem/filesystem.h" #include "sys/sys.h" std::string filesystem::datadir = ""; std::string filesystem::homedir = ""; std::string filesystem::basedir = ""; std::string filesystem::moddir = ""; void filesystem::init() { con_print << "Initializing filesystem..." << std::endl; // FIXME datadir should by set by ./configure and read from config.h // initialize game data locations datadir = "./data/"; basedir = "base/"; moddir = ""; // FIXME win32 homedir = getenv("HOME"); homedir = homedir + "/.osirion/"; Path::create(homedir); Path::create(homedir+basedir); if (moddir.size() && !Path::exists(homedir+moddir)) Path::create(homedir+moddir); } void filesystem::shutdown() { con_print << "Shutting down filesystem..." << std::endl; }