| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Nov 29, 2005, at 12:31 PM, Christopher Linn wrote:
On Nov 29, 2005, at 12:09 PM, Bryan Prusha wrote:On Nov 25, 2005, at 9:51 PM, Eric Schlegel wrote:On Nov 25, 2005, at 1:15 AM, Jerry wrote:Tiger and later: call LSCopyItemAttribute and pass kLSItemContentType.
Pre-Tiger: perhaps 2, but I don't know for sure.
Is this a good way to filter files in a Navigation dialog? I've noticed that our filtering code is the last place we ever use FSSpecs because we can look at the extension of the file without having to do any filesystem operations.
Yes, it is the preferred way to filter files. In Tiger and later, NavServices actually offers built-in support for filtering files by UTI. I believe there's a technote that describes how to write a NavServices filter function that uses LaunchServices and UTIs to filter files, also.
Actually, files can be filtered via UTI on Panther as well via a custom filter proc. Panther Nav doesn't have any built in support for them tho.
Caveat: I don't recommend this approach for Panther. There are far fewer UTIs declared on Panther, so most file extensions and file type codes do not map to a UTI. UTIs declared in Panther were all about pasteboard types. Tiger is where Apple really added UTI declarations for many common file types.
| References: | |
| >Canonical way of determining file type (From: Glen Low <email@hidden>) | |
| >Re: Canonical way of determining file type (From: Eric Schlegel <email@hidden>) | |
| >Re: Canonical way of determining file type (From: Jerry <email@hidden>) | |
| >Re: Canonical way of determining file type (From: Eric Schlegel <email@hidden>) | |
| >Re: Canonical way of determining file type (From: Bryan Prusha <email@hidden>) | |
| >Re: Canonical way of determining file type (From: Christopher Linn <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.