Re: UTI in Lion
Re: UTI in Lion
- Subject: Re: UTI in Lion
- From: Rainer Brockerhoff <email@hidden>
- Date: Fri, 23 Sep 2011 07:56:51 -0300
On 22/09/2011, at 21:01, email@hidden wrote:
> From: Charles Srstka <email@hidden>
> Date: 22 de setembro de 2011 19:19:04 BRT
> To: "Gerriet M. Denkmann" <email@hidden>
> Cc: email@hidden
>
> A while ago someone posted on this list that they needed to list all files that were applications, including old Classic apps. To do that the old way, you’d have to check for .app, bundles with the package bit set and ‘APPL’ in the PkgInfo file, and the “APPL”, “APPC”, “APPD”, “APPE”, “cdev”, “dfil”, and probably some other type codes I’m forgetting. With UTIs, you just check for com.apple.application and be done with it.
Good point, Charles. On the other hand, I was in this exact situation some years ago - not only having to list all apps, but also having to distinguish which were Classic and which were not (and exclude command-line apps) - and it turned out the UTI algorithm wasn't sufficient for that, so I had to my own.
In defense of UTIs, they were new at the time and the algorithm didn't cover all those possibilities.... and now in Lion, with Classic deprecated for so long, it probably no longer covers them all either. PowerPC-only apps may be dropped out in 10.8, who knows.
"Check for com.apple.application and be done with it" is very convenient, and OK as long as we remember it's not magic, and that the results with change with different releases.
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"In the affairs of others even fools are wise
In their own business even sages err."
Weblog: http://www.brockerhoff.net/blog
_______________________________________________
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