mirror of
https://github.com/jakcron/nstool
synced 2024-11-23 14:09:29 +00:00
23 lines
577 B
C
23 lines
577 B
C
|
#pragma once
|
||
|
#include <fnd/IFile.h>
|
||
|
#include <fnd/SharedPtr.h>
|
||
|
|
||
|
namespace fnd
|
||
|
{
|
||
|
class OffsetAdjustedIFile : public fnd::IFile
|
||
|
{
|
||
|
public:
|
||
|
OffsetAdjustedIFile(const fnd::SharedPtr<fnd::IFile>& file, size_t offset, size_t size);
|
||
|
|
||
|
size_t size();
|
||
|
void seek(size_t offset);
|
||
|
void read(byte_t* out, size_t len);
|
||
|
void read(byte_t* out, size_t offset, size_t len);
|
||
|
void write(const byte_t* out, size_t len);
|
||
|
void write(const byte_t* out, size_t offset, size_t len);
|
||
|
private:
|
||
|
fnd::SharedPtr<fnd::IFile> mFile;
|
||
|
size_t mBaseOffset, mCurrentOffset;
|
||
|
size_t mSize;
|
||
|
};
|
||
|
}
|