in reply to Virtual Disk for Perl

Yes, Linux already have something for this. But you are missing the point. A pure Perl module, fully portable!!! The app that will use this will be made to work in any OS!

The idea is to save files and directorys inside a unique file.

Graciliano M. P.
"The creativity is the expression of the liberty".

Replies are listed 'Best First'.
Re: Re: Virtual Disk for Perl
by valdez (Monsignor) on Mar 07, 2003 at 21:33 UTC

    How would lock a resource on that file system? Every time you need to access a resource inside *one* file, you would deny access to any other concurrent request for another resource...

    I had your idea many times, mostly because I needed the creation time, but always gave up and returned to some sort of db (with paths as primary keys for example). Use a DWIMish DBI module if you need portability.

    Ciao, Valerio

       Another idea is to treat a zip file as a filesystem.

       You get compression for free, the file may be used by other processes, and you can work upon temporary files until you need to perform the updating - which simplifys the locking others have mentioned.

      Steve
      ---
      steve.org.uk
      Yes, when you are using the file to write or read you block all the virtual disk. But you only have the handle of the file opened when you are sending read/write commands. In other words, between this read/write commands different process can use the file. Wasn't easy to make, but it's working! ;-P

      Graciliano M. P.
      "The creativity is the expression of the liberty".