implemented rfile reading

This commit is contained in:
zanostro 2025-11-17 12:33:06 +01:00
parent ba18b92116
commit 5d2a0f867c
5 changed files with 107 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#pragma once
#include "reader.h"
#include <string>
#include <fstream>
class FileReader : public Reader {
public:
explicit FileReader(const std::string &path, std::ios::openmode m = std::ios::binary);
~FileReader() override;
int readByte() override;
bool readBytes(uint8_t* buf, size_t len) override;
std::string readString(size_t len) override;
bool good() const;
private:
std::ifstream in;
};