From 28180e6b6763e4ce5d65c02e4df5380f11e6d10a Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 30 Jan 2008 17:29:25 +0000 Subject: filesystem subsystem --- src/filesystem/file.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/filesystem/file.h (limited to 'src/filesystem/file.h') diff --git a/src/filesystem/file.h b/src/filesystem/file.h new file mode 100644 index 0000000..5e997a2 --- /dev/null +++ b/src/filesystem/file.h @@ -0,0 +1,35 @@ +/* + filesystem/file.h + This file is part of the Osirion project and is distributed under + the terms of the GNU General Public License version 2 +*/ + +#ifndef __INCLUDED_FILESYSTEM_FILE_H__ +#define __INCLUDED_FILESYSTEM_FILE_H__ + +// C++ headers +#include +#include + +namespace filesystem { + +/// a class to open data files +class File : public std::ifstream { +public: + /// open the file for reading + virtual void open(const char * filename, std::ios_base::openmode mode = std::ios_base::in); + + /// current filename + inline std::string name() { + return file_name; + } + +private: + std::string file_name; +} +; // class File + +} // namespace filesystem + +#endif // __INCLUDED_FILESYSTEM_FILE_H__ + -- cgit v1.2.3