Post by silvioprogIf I understood right, did you create something like GIO or GVFS? Or
neither of them hehe
Hello,
Yes and no :) It's something like GVFS but at your program level only. I
originally develop it to be used in a forensic tool (which was not
finally developed) to allow the same data scan engine to work in
compressed files as they were real files so the file access logic is
completly isolated from the information gather engine as this one works
over a TVirtualFileSystem, how you implement your TVirtualFileSystem is
up to your decision.
You basically need to implement this functions:
function intfOpenFile(const AFileName: UTF8String; const AMode:
cardinal): TvlHandle; virtual; abstract;
function intfCloseFile(const Handle: TvlHandle): Boolean; virtual; abstract;
function intfFindList(const APath: UTF8String; const AMask: UTF8String):
TVirtualLayer_FolderList; virtual; abstract;
function intfSeek(const AHandle: TvlHandle; const APosition: int64;
const Origin: word): int64; virtual; abstract;
function intfRead(const Handle: TvlHandle; const Buffer: PBYTE; const
Size: int64): int64; virtual; abstract;
function intfWrite(const Handle: TvlHandle; const Buffer: PBYTE; const
Size: int64): int64; virtual; abstract;
function intfGetFileSize(const AHandle: TvlHandle): int64; virtual;
abstract;
function intfSetFileSize(const AHandle: TvlHandle; const ANewFileSize:
int64): Boolean; virtual; abstract;
function intfDeleteFile(const AFileName: UTF8String): boolean; virtual;
abstract;
function intfGetFreeSpace(const APath: UTF8String): int64; virtual;
abstract;
function intfIsWritableMedia(): Boolean; virtual; abstract;
function intfMakeFolder(const AFolder: UTF8String): Boolean; virtual;
abstract;
function intfRemoveFolder(const AFolder: UTF8String): Boolean; virtual;
abstract;
function intfCopy(const ASourceFileName,ATargetFileName: UTF8String):
Boolean; virtual;
function intfMove(const ASourceFileName,ATargetFileName: UTF8String):
Boolean; virtual;
And you get a file system working. Of course it is a basic file system,
without many functions and some restrictions like all the system works
in case sensitive mode whichever the original one supports.
Post by silvioprogAnother question, does it work remotely too?
As far as you can implement those functions yes, in fact I started
(almost nothing) to write an http access using a remote zip file for
read only and using the http byte ranges to access it.
Maybe I should retake this work :) if there are some interest in the
community.
Attached is a sample (some folder names erased) of the explorer I use to
test the different file systems in "real" situations.
--