Re: UTI in Lion
Re: UTI in Lion
- Subject: Re: UTI in Lion
- From: Charles Srstka <email@hidden>
- Date: Thu, 22 Sep 2011 17:19:04 -0500
On Sep 22, 2011, at 5:05 PM, Gerriet M. Denkmann wrote:
> I guess everybody would win, if the UTI would be stored (e.g. as an extended attribute, like the string encoding is).
>
> There must be some very good reason this is not done - maybe somebody could point it out to me.
That would defeat the purpose of UTIs. UTIs are intended to abstract away the actual type information from the user, so you don’t have to know what kind of metadata (filename extension, HFS type code, MIME type, magic numbers, some kind of future tech, etc.) the OS is using to identify the file type. The idea is, you just tell the OS you can handle text files (for instance), and it gives you text files regardless of whether they have .txt extension, TEXT type code, or are some other subtype of text such as .html that would also be applicable.
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.
Make UTIs into an actual piece of metadata, and they will no longer abstract or unify anything, and you’ll just have this:
http://www.xkcd.com/927/
Charles_______________________________________________
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