From 089cb5f96e400d4ab7c9d8041cb51eb8f118d9c1 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Fri, 1 Aug 2008 19:57:03 +0000 Subject: initial make install support --- src/filesystem/filesystem.h | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'src/filesystem/filesystem.h') diff --git a/src/filesystem/filesystem.h b/src/filesystem/filesystem.h index 83e93c0..f8740d1 100644 --- a/src/filesystem/filesystem.h +++ b/src/filesystem/filesystem.h @@ -11,37 +11,35 @@ #include "filesystem/diskfile.h" #include +#include /// The filesystem namespace contains classes and functions for common file operations. /** filesystem is a core subsystem */ namespace filesystem { -/// location of the main data files, includes trailing / -extern std::string datadir; +typedef std::list SearchPath; -/// location of the personal data files, includes trailing / -extern std::string homedir; - -/// writeable location -extern std::string writedir; - -/// subdirectory with the base data files, includes trailing / -extern std::string basedir; - -/// subdirectory for the current mod, includes trailing / -extern std::string moddir; +SearchPath & searchpath(); /// initialize the filesystem subsystem -void init(); +void init(std::string const & basename, std::string const & modname); /// shutdown the filesystem subsystem void shutdown(); +/// current home directory e.g. ~/.osirion/ +std::string const & homedir(); + +/// current write directory e.g. ~/.osirion/base/ +std::string const & writedir(); + /// open a file and return a pointer to a File instance File *open(const char *filename); + /// open a file and return a pointer to a File instance File *open(const std::string &filename); + /// close and delete a file instance void close(File *file); -- cgit v1.2.3