Re: FS item in trash

2012-10-01 Thread gweston
Is there an API (carbon or cocoa) to determine if an item is in the trash? NSFileManager, NSFileHandle and carbon Files.h do not have anything. Or do I just do a path search looking for ".trash"? You definitely do *not* do that. The name and location of the trash directory is an implementation

Re: FS item in trash

2012-10-01 Thread tridiak
On 2/10/2012, at 10:44 AM, Charles Srstka wrote: > On Oct 1, 2012, at 3:29 PM, Ken Thomases wrote: > >> On Oct 1, 2012, at 2:49 PM, tridiak wrote: >> >>> Is there an API (carbon or cocoa) to determine if an item is in the trash? >>> NSFileManager, NSFileHandle and carbon Files.h do not have an

Re: FS item in trash

2012-10-01 Thread Charles Srstka
On Oct 1, 2012, at 3:29 PM, Ken Thomases wrote: > On Oct 1, 2012, at 2:49 PM, tridiak wrote: > >> Is there an API (carbon or cocoa) to determine if an item is in the trash? >> NSFileManager, NSFileHandle and carbon Files.h do not have anything. > > err = FSDetermineIfRefIsEnclosedByFolder (kOnA

Re: FS item in trash

2012-10-01 Thread Ken Thomases
On Oct 1, 2012, at 2:49 PM, tridiak wrote: > Is there an API (carbon or cocoa) to determine if an item is in the trash? > NSFileManager, NSFileHandle and carbon Files.h do not have anything. err = FSDetermineIfRefIsEnclosedByFolder (kOnAppropriateDisk, kTrashFolderType, &ref, &result); (That's