Burkhard Carstens wrote:
Am Samstag, 23. September 2006 12:02 schrieb Kris Leech:
thanks for the replies, the idea of extending TFileStream to have the
same functions as File sounds good, but would really give me what I
need. To be honest I dont think it is possible, let me explain. Im
writing a VFS (virtual file system) for fpc, so all files are stored
in one big file. This big file is accessed as a stream and a file
read by stream a number of bytes that make up anyone file. This works
well so far. I get TFileStreams from the VFS which I can read and
write to. However these 'files' are not compatible with functions
etc. that require real files... either a path or a file 'pointer'...
Any ideas?
As said, AFAIK "AssignStream" function should do that ..
Yes many thanks, so I can provide files within my VFS as streams and use
standard file operations on them, great, so internally my files can be
accessed. But, any ideas about how to go about allowing procedures which
accept a path/filename to use the files in the VFS, for example loading
a DLL.
I could make a copy of the file in the real file system and pass the
path to the procedure, but that would have security problems since the
file would, at least for a time, be on the file system in plain text.
Where as in the VFS it can be encrypted.
Another option would be to great a driver for the VFS so that it becomes
part of the real file system, but then any person or process could
access the files, also it would not be possible to do a cross platform
VFS...
Also if something like this already exists I would prefer to buy it, I
have come across a few for Delphi but they only support Windows.
Many thanks.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives