Re: Can't get file type code using [fileAttr valueForKey:NSFileHFSTypeCode]
Re: Can't get file type code using [fileAttr valueForKey:NSFileHFSTypeCode]
- Subject: Re: Can't get file type code using [fileAttr valueForKey:NSFileHFSTypeCode]
- From: Lynn Barton <email@hidden>
- Date: Thu, 22 May 2008 16:37:16 -0700
- Thread-topic: 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:
This email sent to email@hidden