Re: Packages vs bundles vs folders etc
Re: Packages vs bundles vs folders etc
- Subject: Re: Packages vs bundles vs folders etc
- From: Ken Thomases <email@hidden>
- Date: Mon, 11 May 2009 18:24:10 -0500
On May 11, 2009, at 1:02 AM, Peter Ammon wrote:
If so, I think you're on the right track. On Leopard, I would get
the UTI of a file via -[NSWorkspace typeOfFile: error:], and then
see if it conforms to kUTTypeFolder via -[NSWorkspace type:fileType
conformsToType:(NSString *)kUTTypeFolder]. If it does NOT conform,
it should be treated as a single item.
If you need Tiger compatibility, you can do the same thing, except
you would use LaunchServices functions like LSCopyItemAttribute().
I know that UTIs are the new hot thing, but doesn't it seem most
direct to consult the kLSItemInfoIsPackage bit of the flags field of
the LSItemInfoRecord filled out by LSCopyItemInfoFor{Ref,URL}?
Regards,
Ken
_______________________________________________
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