Re: How determine if file is in Trash, given Path or Alias
Re: How determine if file is in Trash, given Path or Alias
- Subject: Re: How determine if file is in Trash, given Path or Alias
- From: Kiel Gillard <email@hidden>
- Date: Thu, 28 May 2009 13:23:27 +1000
Nothing comes to mind from the top of my head.
A little digging through Carbon documentation suggested you could use
FSCatalogInfo() function to determine the parent directory ID of the
file you are testing. With the result of that function, you can use
the IdentifyFolder() function to see if the parent directory's folder
type == kSystemTrashFolderType.
Hope this helps,
Kiel
On 28/05/2009, at 1:05 PM, Jerry Krinock wrote:
How can I determine if a given file path, or a file alias (I have
both), refers to an item which is in the Trash?
The obvious answer, using -[NSString hasPrefix:] on the path with
NSHomeDirectory()/.Trash, doesn't look very pretty.
Thanks,
Jerry
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden