On Fri, Dec 17, 2004 at 04:54:33PM +1100, Russell Penney wrote:
> My plan is to have nearly everything written in Squeak with very basic
> primitives, that way it allows more control.
> Fundamentally there are 3 classes:
> File handles file access
> Directory handles directory access
> FileSystem handles the raw access and provides a unified interface for Files
> and Directories.
If you're going to do a complete rewrite, it would also be good to
generalize the notion of an I/O channel for files, sockets, pipes,
or whatever other external resources can be modeled in this way.
I took a step in this direction with IOHandle (on Squeak Map). This
has not been updated for current Squeak, but I'll be happy to do so if
you have an interest. IOHandle separates the representation of I/O
channels such as files and sockets from the higher level stream
and file system stuff.
On Squeak versions up through 3.6, you can install IOHandle to move
all the low-level representations out of FileStream and Socket without
breaking the old code (this is a bit tricky, because you have to be able
to keep using the changes file while filing in the changes). To make it
work on current Squeak, I would need to adapt it for the new Sockets
classes, and redo the installation process.
You might also find some useful things in DirectoryPlugin on SM,
although this is intended to support the current file system, and
it's probably best to throw all of this out and start fresh.