Weak support for directory manipulation in Squeak (?)

Peter Crowther peter.crowther at it-iq.com
Fri Apr 9 07:27:54 UTC 1999


> I think it's silly that deleting a directory
> fails if it's not empty - it should recursively delete its contents.

I know of no OS that does this.  If the application wishes to recursively
delete a large area of filestore, then it's up to the application to do so.
Partly, that's because it's easier for the OS to implement that way round!

Deletion can get particularly interesting on Windows, where the Explorer
hides file extensions and you can therefore have a directory with the same
(apparent) name as a file.  If you ask the system to delete the file, using
its visible name, you would instead delete the directory.  And, yes, I *do*
know someone who's done this.

I'll get a load of responses to this saying 'but that's just a GUI issue
that arises due to the appalling UI design in Windows 95'.  Yes, but there
are plenty of other counter-intuitive examples in other systems.  I'd rather
have the safety of a *primitive* delete-directory function only removing an
empty directory, and requiring non-primitive code to walk the directory
structure to do a recursive delete.

		- Peter





More information about the Squeak-dev mailing list