James Edward Gray II wrote:
> On Nov 8, 2009, at 7:47 PM, apeiros / gmx.net wrote:
> 
>> I just put FileString on github: http://github.com/apeiros/filestring
>> FileString is a class that wraps a path on the filesystem (a file) and 
>> provides an exact copy of the String API. This means you can code as 
>> if you had a String and your file on the disk gets manipulated just 
>> "magically".
> 
> Interesting choice to use a String.  I used Tie::File a couple of times 
> in Perl code.  It works as an Array instead:
> 
> http://search.cpan.org/~mjd/Tie-File-0.96/lib/Tie/File.pm
> 
> James Edward Gray II

What would the advantage over mmap[1] be? FileString is pure ruby 
(right?) and hence more portable, but probably mmap is much more 
efficient? Any other tradeoffs?

[1] http://moulon.inra.fr/ruby/mmap.html; looks like this project of Guy 
Decoux's has been recently adopted by knu: http://github.com/knu/ruby-mmap.

-- 
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407