File system model (was: UnixFileDirectoryPlugin)

Tim Rowledge tim at sumeru.stanford.edu
Fri Jan 18 03:40:47 UTC 2002


"Lex Spoon" <lex at cc.gatech.edu> is widely believed to have written:

> The bulk of Squeak is pretty platform-independent.  It would be nice if
> files, were too.  Let's keep the generic file interface simple, and then
> leave nitty-gritt stuff to platform-specific packages.  Really, if you
> are interested in stuff beyond the lowest common denominator, you are
> likely to be targetting a specific platform anyway, I would think.
Not always in a problematic way, at least. One nice thing about
Smalltalk is using inheritance to get around a lot of the problems of
LCD code.

As an example, consider searching a directory for files with names
matching some simple expression. Currently, we could do it by getting
all the entries in the dir and then matching against them - in fact I'm
reasonably sure that is exactly what we do do.
However, RiscOS has a call that looks for the next file _matching some
expression_ within the directory. I use it with '*' for the normal
#primLookupEntryIn:index. It would be sensible to expand this to allow
fuller use of the platform capability whenever possible. You could even
get really clever and make use of partially matching capabilities -
RiscOS filename matching is only of the simple 'foo*ab' variety rather
than fullscale regexp stuff, but there is presumably some expression
mangling one could do to get the best matches possible via the api and
then do tighter matching in squeak code.

One of the most complex cases I know of where this was used was
the original ParcPlace VanGogh project working on native widget (yay -
merging two threads witha sinlge mighty bound!) access. It was pretty
successful (technically - politically nothing much worked at PPD in
those days)

tim

-- 
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Useful random insult:- Thinks "Private Enterprise" means owning a personal starship.




More information about the Squeak-dev mailing list