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 protected])

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 [email protected]

Reply via email to