[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in Random File Access

One thing you have to do is call READ-BYTES to "prefetch" the bytes
you subsequently read.  This DOES actually appear in the manual, but
it's damned hard to find -- or understand, when one does find it.

I would also point out that, in order to access TEXT files randomly, it
seems one has to include :DIRECT T :DIRECTION :IO :IF-EXISTS :OVERWRITE
in the WITH-OPEN-FILE parameter list.  (If one is not reading text, then
not so much is required, for some reason.)  This has the unfortunate
effect of updating the file's WRITE date/time even if one doesn't write
anything!  I view this as a glaring hole in the implementation: it's as
if Symbolics denies that random access to text files would be important
to anyone, so making the parameters arcane, and casually requiring that
the programmer pretend to be writing in the file, is OK.

-Jonathan Slocum