On 22/09/2011, at 21:01, cocoa-dev-requ...@lists.apple.com wrote:
> From: Charles Srstka <cocoa...@charlessoft.com>
> Date: 22 de setembro de 2011 19:19:04 BRT
> To: "Gerriet M. Denkmann" <gerr...@mdenkmann.de>
> Cc: cocoa-dev@lists.apple.com
> 
> 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  <rai...@brockerhoff.net>
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 (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to