diff options
Diffstat (limited to 'src/common/file.h')
-rw-r--r-- | src/common/file.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common/file.h b/src/common/file.h index a377981..842450e 100644 --- a/src/common/file.h +++ b/src/common/file.h @@ -18,7 +18,10 @@ class File : public std::ifstream { public: /// open the file for reading - void open(const char * filename, std::ios_base::openmode mode = std::ios_base::in ); + virtual void open(const char * filename, std::ios_base::openmode mode = std::ios_base::in ); + + /// current filename + inline std::string name() { return file_name; } /// location of the main data files, includes trailing / static std::string datadir; @@ -28,6 +31,8 @@ public: static std::string basedir; /// subdirectory for the current mod, includes trailing / static std::string moddir; +private: + std::string file_name; }; // class File } // namespace common |