I must be thinking about this wrongly, somehow.
So...how does one handle indexed (random) access to a large file - one
too large to have in memory? I can't believe that random/like disk I/O
is not possible in ruby.
Thanks in advance...
t.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC
Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< t...@tomcloyd.com >> (email)
<< TomCloyd.com >> (website & psychotherapy weblog)
<< sleightmind.wordpress.com >> (mental health issues weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ echo thisisatest > test.fil
$ irb
>> f = File.open('test.fil')
=> #<File:test.fil>
>> f.seek(3, IO::SEEK_SET)
=> 0
>> f.read 3
=> "sis"
/dh
Tks,
Tom C.