• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Opening the trash in the Finder?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opening the trash in the Finder?


  • Subject: Re: Opening the trash in the Finder?
  • From: Michael McCracken <email@hidden>
  • Date: Tue, 28 May 2002 01:05:49 -0700

I'm sure that I'll be the tenth person to mention this, but the trash is always at ~/.Trash/
I tested it in the terminal with "open ~/.Trash", and it opens the trash alright, but without the fancy trash logo... but at least it's there. so i guess the path [NSHomeDirectory() stringByAppendingPathComponent:@".Trash/"] should do it. (That I didn't test :) )

Maybe the cleanest way (depends on opinion) would be to tell Finder to open the trash using applescript: here's how from the terminal:

mike% osascript
tell application "Finder"
open trash
end tell

Hope this helps,
-mike
--
Michael McCracken
email@hidden
http://radio.weblogs.com/0101358


On Tuesday, May 28, 2002, at 01:41 , Matt Gemmell wrote:

I'm unsure as to where the Trash for the current user actually lives in
the filesystem

Unless anyone finds a clean way, I would suggest making a /tmp file,
making an alias to it (Carbon), trash the file, and resolve the alias
(Carbon). This terrible hubbub should give you the *current* Trash folder;
no guarantee of course the same folder was used five minutes ago, or 'll
be used five minutes in future. Sorry I can't help better :(
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Opening the trash in the Finder?
      • From: "Clark S. Cox III" <email@hidden>
    • Re: Opening the trash in the Finder?
      • From: Matt Gemmell <email@hidden>
  • Prev by Date: Re: Drawing white text with black shadow?
  • Next by Date: Re: Calling a UNIX application from a carbon app
  • Previous by thread: Re: Opening the Trash in the Finder?
  • Next by thread: Re: Opening the trash in the Finder?
  • Index(es):
    • Date
    • Thread