2018-04-15 02:36:23 +00:00
|
|
|
#pragma once
|
|
|
|
#include <fnd/types.h>
|
|
|
|
|
|
|
|
namespace fnd
|
|
|
|
{
|
|
|
|
class IFile
|
|
|
|
{
|
|
|
|
public:
|
2018-10-06 05:15:42 +00:00
|
|
|
virtual ~IFile() = default;
|
2018-05-11 13:10:04 +00:00
|
|
|
|
2018-04-15 02:36:23 +00:00
|
|
|
virtual size_t size() = 0;
|
|
|
|
virtual void seek(size_t offset) = 0;
|
2018-04-15 06:01:24 +00:00
|
|
|
virtual void read(byte_t* out, size_t len) = 0;
|
2018-04-15 02:36:23 +00:00
|
|
|
virtual void read(byte_t* out, size_t offset, size_t len) = 0;
|
2018-04-15 06:01:24 +00:00
|
|
|
virtual void write(const byte_t* out, size_t len) = 0;
|
2018-04-15 02:36:23 +00:00
|
|
|
virtual void write(const byte_t* out, size_t offset, size_t len) = 0;
|
|
|
|
};
|
|
|
|
}
|