mirror of
https://github.com/uroni/urbackup_backend.git
synced 2025-10-26 11:36:50 +00:00
(cherry picked from commit d708509cb312074619742df23c2c145c0f66ac23) Conflicts: Interface/File.h file_memory.cpp file_memory.h fsimageplugin/CompressedFile.h fsimageplugin/vhdfile.cpp fsimageplugin/vhdfile.h
36 lines
722 B
C++
36 lines
722 B
C++
#pragma once
|
|
|
|
#include "../Interface/File.h"
|
|
#include "../Interface/Types.h"
|
|
#include <string>
|
|
#include "IVHDFile.h"
|
|
|
|
class FileWrapper : public IFile
|
|
{
|
|
public:
|
|
FileWrapper(IVHDFile* wfile, int64 offset);
|
|
|
|
virtual std::string Read(_u32 tr, bool *has_error);
|
|
|
|
virtual _u32 Read(char* buffer, _u32 bsize, bool *has_error);
|
|
|
|
virtual _u32 Write(const std::string &tw, bool *has_error);
|
|
|
|
virtual _u32 Write(const char* buffer, _u32 bsize, bool *has_error);
|
|
|
|
virtual bool Seek(_i64 spos);
|
|
|
|
virtual _i64 Size(void);
|
|
|
|
virtual _i64 RealSize();
|
|
|
|
virtual std::string getFilename(void);
|
|
|
|
virtual std::wstring getFilenameW(void);
|
|
|
|
virtual bool PunchHole( _i64 spos, _i64 size );
|
|
|
|
private:
|
|
int64 offset;
|
|
IVHDFile* wfile;
|
|
}; |