Initial sources

This commit is contained in:
2025-02-28 04:43:17 +03:00
commit d9437c8619
34 changed files with 18207 additions and 0 deletions

28
engine/filesystem/file.h Normal file
View File

@@ -0,0 +1,28 @@
#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);
size_t 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