[Pharo-project] Xtreams files

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Tue Oct 12 15:26:12 EDT 2010


I added a hook to Xtreams files this evening.
The hook by now is in FileDirectory (no comment... I'll be happy when
a replacement is integrated in Squeak/Pharo).

((FileDirectory default / 'toto.txt') writing encoding: #ascii) write:
'hello world'; close.
((FileDirectory default / 'toto.txt') reading encoding: #ascii) rest.

I didn't hook into StandardFileStream, but rather a simplified version
of David Lewis IOHandle.
I separated this stuff in Xtreams-SqueakExternals.
Anyway, this is not really related to Xtreams, most of the
functionality should be in core (apart reading/writing/appending which
might better return in Xtreams-Terminals).

I also slighlty modified XTFileReadStream and XTFileWriteStream to fit
some Squeak specific API.
Maybe I could have just used the VW API and provide compatibility
layer... We'll see later.

Nicolas




More information about the Pharo-dev mailing list