1
0
mirror of synced 2024-11-19 05:17:12 +01:00
ImHex/include/providers/file_provider.hpp
2020-11-11 10:47:02 +01:00

28 lines
602 B
C++

#pragma once
#include "providers/provider.hpp"
#include <string_view>
namespace hex::prv {
class FileProvider : public Provider {
public:
explicit FileProvider(std::string_view path);
~FileProvider() override;
bool isAvailable() override;
bool isReadable() override;
bool isWritable() override;
void read(u64 offset, void *buffer, size_t size) override;
void write(u64 offset, void *buffer, size_t size) override;
size_t getSize() override;
private:
FILE *m_file;
bool m_readable, m_writable;
};
}