diff options
author | Stijn Buys <ingar@osirion.org> | 2008-08-01 19:57:03 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-08-01 19:57:03 +0000 |
commit | 089cb5f96e400d4ab7c9d8041cb51eb8f118d9c1 (patch) | |
tree | 9799137f41d5104ed4911ac5774f9f50406581d9 /src/filesystem/filesystem.h | |
parent | cc335cfbf13a6b21c5f65febc6049eb5d4c16b63 (diff) |
initial make install support
Diffstat (limited to 'src/filesystem/filesystem.h')
-rw-r--r-- | src/filesystem/filesystem.h | 26 |
1 files changed, 12 insertions, 14 deletions
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 <string> +#include <list> /// 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<std::string> 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); |