diff options
author | Stijn Buys <ingar@osirion.org> | 2008-02-08 19:24:12 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-02-08 19:24:12 +0000 |
commit | d3477eedc113a2c126f36f41384b8921d610906a (patch) | |
tree | 68df921c4acf03878ae244db8350e2e96936c494 /src/filesystem/diskfile.h | |
parent | 598dba9d17838e92f89bcd3ec78c69cc4ce50044 (diff) |
updated filesystem, removed inifile, updated game and tga loader
minor cleanups
Diffstat (limited to 'src/filesystem/diskfile.h')
-rw-r--r-- | src/filesystem/diskfile.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/filesystem/diskfile.h b/src/filesystem/diskfile.h new file mode 100644 index 0000000..b71576d --- /dev/null +++ b/src/filesystem/diskfile.h @@ -0,0 +1,43 @@ +/* + filesystem/diskfile.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_DISKFILE_H__ +#define __INCLUDED_FILESYSTEM_DISKFILE_H__ + +#include "filesystem/filesystem.h" +#include "sys/sys.h" + +#include <stdio.h> + +#include <string> + +namespace filesystem +{ + +/** + * @brief implementation of File for a file on disk + */ +class DiskFile : public File +{ +public: + DiskFile(); + virtual ~DiskFile(); + + virtual bool open(const char * filename); + virtual void close(); + + virtual size_t read(void *buffer, size_t count); + + void skip(size_t count); + +private: + FILE *diskfile_handle; +}; + +} // namespace filesystem + +#endif // __INCLUDED_FILESYSTEM_DISKFILE_H__ + |