#ifndef __C_READ_FILE_H_INCLUDED__
#define __C_READ_FILE_H_INCLUDED__
#include <stdio.h>
#include "IReadFile.h"
#include "irrString.h"
namespace irr
{
namespace io
{
class CReadFile : public IReadFile
{
public:
CReadFile(const io::path& fileName);
virtual ~CReadFile();
virtual s32 read(void* buffer, u32 sizeToRead);
virtual bool seek(long finalPos, bool relativeMovement = false);
virtual long getSize() const;
virtual bool isOpen() const
{
return File != 0;
}
virtual long getPos() const;
virtual const io::path& getFileName() const;
private:
void openFile();
FILE* File;
long FileSize;
io::path Filename;
};
}
}
#endif