Extending FileList with CrLf

Lex Spoon lex at cc.gatech.edu
Mon Jul 21 01:55:31 UTC 2003


Volker Nitsch <nitsch-lists at netcologne.de> wrote:
> Am Freitag, 18. Juli 2003 18:22 schrieb Ned Konz:
> > On Friday 18 July 2003 09:12 am, Volker Nitsch wrote:
> > > Hacking a bit in FileList to use CrLFileStream.:
> > >
> > > FileList opens its files with FileDirectory.
> > > Currently i clone oldFileOrNoneNamed:etc as
> > > oldCrLfFileOrNoneNamed: etc. is this the right way?
> >
> > No need to do this (see below).
> >
> > > Also i subclass FileList as CrLfFileList. would some flag or such
> > > in FileList itself be better?
> >
> > We already have one. See FileStream class>>concreteStream and its
> > callers.
> >
> > Have you just tried changing FileStream class>>concreteStream to:
> >
> 
> Yes, in a squeak-try a while ago. Caould be 3.2? 
> Something broke IIRC, thinking files are binary.
> A comment indicated concreteStream will change to use it.
> This did not happen till today, so i guest there are to many problems.
> 
> So i want a FileList explicitly using CrLfFileStream without affecting the 
> rest.
> 

If you want to explicitly avoid CrLfFileStream, you can simply open your
file in binary mode.  That's what binary mode is: it means that you are
directly accessing the bytes in the file.

That said, I've been using CrLfFileStream for years and am not seeing
very many problems in my own image.  So how about you just go for it?


I think it's just inertia that keeps StandardFileStream as the standard.
 Not many people know about it or use it.  It would be great if this got
changed, though....  If people are only avoiding it because of the
possibility of bugs, then let's switch over and get the bugs fixed!  It
would simplify Squeak and remove a useless preference.


Lex



More information about the Squeak-dev mailing list