Weak support for directory manipulation in Squeak (?)

Stephen Travis Pope stp at create.ucsb.edu
Thu Apr 8 18:43:14 UTC 1999


Colin Sarsfield wrote:
> 
> >The problem remains that you apparently cannot remove a directory, and
> >that, as far as I can guess, a new primitive is required for this.
> 
> VMs could simply be rewritten to check it the file is a directory, and then
> use a different method of deletion in the primitive invoked by
> deleteFileNamed:.

This is the big question; one could decide to (a) handle files and
directories using the same calls (create file could apply to a directory
if the file name ends with the directory separator and delete could
check what kind of file is being deleted), or (b) to handle them
differently *but symmetrically* with separate primitives. Neither of
these is currently the case. The code I sent out earlier was moving
towards solution (b), largely because that's the way it's most
frequently done, and the overhead is only 1 additional primitive. Are
there good arguments for solution (a)?

-- 
stp

Stephen Travis Pope | stp at create.ucsb.edu |
http://www.create.ucsb.edu/~stp





More information about the Squeak-dev mailing list