OS level Trash Can

Jimmie Houchin jhouchin at texoma.net
Thu Feb 20 17:05:22 UTC 2003

I have been playing around with learning and testing File* code.

In the process I have created 10s of 1000s of files and have been 
deleting them via the OS. So I thought I would browse the FileDirectory 
to learn how to delete from within Squeak so I wouldn't have to leave 
Squeak in order to do such a mundane task. :)

So here is what I came up with:

"Delete the test files"
| filedir |
filedir := FileDirectory default fullName, '\testfiles\'.
filedir := FileDirectory on: filedir.
filedir deleteLocalFiles.

It works fine. But it deletes the files completely and doesn't place 
them in the OS Trash or RecycleBin. For what I am currently doing that 
is fine.

Is there a way to place files into the OS Trash/RecycleBin?
Has such a feature been thought of?

It seems as if it would be a nice way to enable staying within Squeak 
more. I'm hoping as things progress I will be able to do more in Squeak 
and drop to the OS less and less. Let Squeak manage the OS and its 
activities. :)


Jimmie Houchin

More information about the Squeak-dev mailing list