Weak support for directory manipulation in Squeak (?)

Tim Rowledge rowledge at interval.com
Wed Apr 7 17:15:09 UTC 1999


On Wed 07 Apr, Stephen Pope wrote:
> In porting the Minnestore OODB to Squeak, I'm running into problems with
> directory manipulation. There are methods in class FileDirectory for creating
> directories, but not for deleting them (FileDirectory deleteFileNamed: won't
> work)
This probably depends somewhat on your platforms choice of behaviour for the
ANSI C 'remove' function. On the Acorn, it does indeed remove the directory -
as long as it is empty... occupied ones are a different matter!

> or asking whether a directory exists (FileDirectory fileExists: answers
> false),
It's also a poor implementation - it opens the file and immediately closes it,
instead of using a more efficient OS call.  A prim would be much better.
>
> Should we use a couple of the empty primitives in the range 163-168 for new
> directory primitives?
I'd say that would be reasonable. Just as long as the SQ code can cope properly
with older VMs missing the prims...

tim 

-- 
Make sure comments and code agree.
Tim Rowledge:  rowledge at interval.com (w)  +1 (650) 842-6110 (w)
 tim at sumeru.stanford.edu (h)  <http://sumeru.stanford.edu/tim>





More information about the Squeak-dev mailing list