Re: UTI in Lion
Re: UTI in Lion
- Subject: Re: UTI in Lion
- From: Kyle Sluder <email@hidden>
- Date: Fri, 23 Sep 2011 08:27:07 -0700
On Fri, Sep 23, 2011 at 5:01 AM, Sander Stoks <email@hidden> wrote:
> I think the way this was solved in BeOS was pretty nice. A file had a type/creator code there as a special attribute. A file "inherited" from a different platform would be sniffed by a low-priority background thread, which employed several heuristics to determine the file type - looking at magic bytes in the header, or looking at the file extension as a last resort. Files which already had the attributes were left alone.
This is not all that different from how UTIs behave now. Launch
Services employs a few extremely simple heuristics (file extension,
creator code, MIME type) and assigns a UTI to the file.
The big difference is that the detected UTI isn't recorded. If Launch
Services recorded the last UTI it detected for the file in an xattr on
that file, and if the user had the ability to change that recorded
value, we'd have the system you're referring to, without losing ANY of
the features of UTIs.
--Kyle Sluder
_______________________________________________
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