diff options
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__ + |