Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-04

Stackable file system abstraction layer

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

JoshyFun

Hello,

Since a week ago I was working in an implementation of something like a stackable file system which does not require many changes in currently developed sources and let me create a simple file system over a single file (in example). Now the first steps are ready and an example is working (more or less) and now I do not know if this project could be of interest to the community or finish it to fit my needs only.

So I had posted a zip file in my web site with current source codes (not clean, not well organized, almost no comments and/or document) and ask for a bit of feedback. Also the zip file have the compiled demo executable for Windows as it will work in Windows by now (Linux should work but maybe it will need a bunch of small changes). If you do not trust me, compile sources instead run the compiled one.

The demo is a simple file browser with a "Virtual files" folder which is render in "C:\temp\vfile.vfile" (so you need a "C:\temp" folder in order to run the example), the windows disk letters and the ability to mount a zip file as a folder and browse and read it.

* Unzip code taken from unzip.pp and changed to be used with streams instead direct file access, it has not been fully tested.

The demo zip is here: http://joshyfun.peque.org/special/VL_Test.zip (476 KBytes).

Thank you for your feedback.

Best regards, JoshyFun mailto:

Reply by email

Graeme Geldenhuys
to JoshyFun
JoshyFun wrote
The demo is a simple file browser with a "Virtual files" folder which is render in "C:\temp\vfile.vfile" (so you need a "C:\temp" folder in order to run the example), the windows disk letters and the ability to mount a zip file as a folder and browse and read it.

Is that similar to TZipFile [http://wiki.freepascal.org/ZipFile]. TZipFile is component that allows you to use a zip file like a filesystem. You have the usual commands like Create directory, create file, edit file, view file etc... All directly inside the zip archive, like you would do with normal files in a file system.

We haven't gotten the actual compression part working yet, but using a zip file with no compression works perfectly.

I simply thought I would mention this project, as it seems both are trying something similar. :)

Regards,
- Graeme -

_______________________________________________________ fpGUI - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

JoshyFun
to Graeme Geldenhuys

Hello Graeme,

Wednesday, April 23, 2008, 9:07:45 AM, you wrote:

GG> JoshyFun wrote
> The demo is a simple file browser with a "Virtual files" folder which > is render in "C:\temp\vfile.vfile" (so you need a "C:\temp" folder in > order to run the example), the windows disk letters and the ability to > mount a zip file as a folder and browse and read it.

GG> Is that similar to TZipFile [http://wiki.freepascal.org/ZipFile]. GG> TZipFile is component that allows you to use a zip file like a GG> filesystem. You have the usual commands like Create directory, create GG> file, edit file, view file etc... All directly inside the zip archive, GG> like you would do with normal files in a file system.

The "demo" is quite similar, but my project is completly different, in fact the unzip support was accidental :) as I need something to test code different than native file system.

My class is intented to provide a file system over a file system, over a file system, and so on, and an application will only need a buch of changes to be able to use it. In fact the demo can mount "unlimited" .zip files and copy data from the .zip to any other file system (I had started the ftp file system) and the main application do not need to add any kind of special code to handle the "new" file system, unless it want to perform special functions like set/get attributes, in that case special support for that layer is needed.

GG> We haven't gotten the actual compression part working yet, but using a GG> zip file with no compression works perfectly.

The TZipFile code looks pretty and easy to follow, maybe I'll try to change my "dirty hack" of unzip.pp by the one provided by TZipFile; but as I say the unzip support is not a must in my case.

GG> I simply thought I would mention this project, as it seems both are GG> trying something similar. :)

No, my target is a abstraction to access files whichever they are stored, locally, remotelly, compressed, crypted, or in an unsupported device (un supported by the OS) but using a single interface to them; something like the TStream abstraction but for the complete file system, instead only single media object.

In the other hand maybe this code is better for the fpc project as it is not intented to be used visually (no visual objects) :-?

Anyway thank you for the feedback.

Best regards, JoshyFun mailto:

Reply by email