#ifndef FILE_H
#define FILE_H

#include "filesystem/filecommon.h"

class File
{
public:
	File(const char* path, FileAccess access);
	~File();

	FILE* getHandle() { return m_filehandle; }

	void seek(SeekDir seekdir, long offset);
	long tell();
	bool eof();

	size_t read(void* buffer, size_t size);
	size_t write(void const* buffer, size_t size);

	// helpers
	void readStringBuffer(char* buffer, size_t bufferSize);

private:
	FILE* m_filehandle;
};

#endif
