Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't get file type code using [fileAttr valueForKey:NSFileHFSTypeCode]



The replies to my original question are appreciated, but they do not answer
the question. Once my NSFileManager object has found a file of interest, why
can I get the modification date with the key NSFileModificationDate (using
objectForKey or valueForKey doesn't matter) but I can't get the OSType code
with the key NSFileHFSTypeCode. Each time I try to access this data I get a
different result. I know that the file has a type code because I can access
it with another program.

>From what I have read quickly since Sean McBride sent his comment, UTIs are
not yet implemented to the point where I could get the UTI of every file on
my computer.

File attribute keys are found on page 48 of the pdf version of the document
"NSFileManager Class Reference".


On 5/22/08 1:43 PM, "Sean McBride" <email@hidden> wrote:

> On 5/21/08 10:35 PM, Jens Alfke said:
> 
>> In general you're better off checking the filename extension. (I know.
>> I used to be rabidly in favor of HFS types over extensions, but I gave
>> up that fight years ago...)
> 
> In general you're better off checking the UTI.
> <http://developer.apple.com/macosx/uniformtypeidentifiers.html>
> 
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 email@hidden
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
> 


_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Can't get file type code using [fileAttr valueForKey:NSFileHFSTypeCode] (From: "Sean McBride" <email@hidden>)



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.