Weak support for directory manipulation in Squeak (?)
dmaxwell at launchpados.com
Thu Apr 8 21:20:42 UTC 1999
Of course the user should be warned - but this is the job of the Smalltalk
file system support classes and the UI, not the primitive.
For instance, user deletion of a directory on the Mac really is moving just
it to the special "Trash" directory, which is why it's recoverable - but
when it comes to actually emptying the trash, then the operation should be
easy. The (common) error you made was due to the fact that UNIX exposed
the functionality in a potentially dangerous way.
>Duane Maxwell wrote:
>> I think they should be treated identically except for creation. The
>> differentiation of behaviors for directories and files should be handled
>> within the primitives, with the "natural" thing being done, even if it
>> means throwing an error. I think it's silly that deleting a directory
>> fails if it's not empty - it should recursively delete its contents.
> [Norton, Chris] Yikes! The user should probably be warned first!
>When I was a Unix newbie, I accidentally executed the following command,
>thinking that it would delete all of the core files from all subdirectories,
>and boy was I mistaken! It nuked my whole machine and it took a couple of
>hours to restore everything back.
> rm -rf * "core"
> (Note: the actual syntax may have changed... I haven't touched Unix
>in over 7 years)
> ---==> Chris
Duane Maxwell dmaxwell (at) launchpados.com
Launchpad, Inc. (619) 578-8500 x226
Information contained herein is my personal opinion
and not necessarily that of Launchpad, Inc.
More information about the Squeak-dev