On Apr 16, 2010, at 1:43 PM, Paul Sanders wrote:

> > But emptying the trash will delete files on *other mounted volumes* as 
> > well, not just the disk being examined.
> 
> rm -rf ~/.Trash/*
>  
> For volumes other than the startup volume it is a little more complicated:
>  
> rm -rf /Volumes/volume_name/.Trashes/uid/*
>  
> The Finder seems to notice when you do this and keeps in sync.
>  
> Looking in these folders will also allow you to give the user some idea of 
> what he is about to permanently delete.

Yes, I'm fully aware of what's going on when this happens. That's not the 
point. An application that purports to free disk space on a specific volume 
under examination should not be deleting user files on other volumes! He 
*wants* to empty the trash on *all* mounted volumes, possibly because he wants 
to erase the trash on a specific mounted volume under examination, not just 
~/.Trash/. This is a blunderbuss approach with a high likelihood of data loss:

User accidentally drags file A-file on volume A to trash with other files user 
did intend to trash. User finds that volume B is near full and examines it with 
OP's app. OP's app empties trash, deleting A-file, even though this frees zero 
additional space on volume-B. Oops!

Again, someone who doesn't have an expert knowledge of the intended operation 
of the Finder and an equally experienced knowledge of user expectations 
shouldn't be doing this.

warmest regards,

Ralph


Raffael Cavallaro
raffaelcavall...@me.com





_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to