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: Jens Alfke <email@hidden>
- Date: Wed, 21 May 2008 22:35:58 -0700
On 21 May '08, at 9:22 PM, Lynn Barton wrote:
I am getting the date OK,
but not the type code, which should be “TEXT” for text files and
might be
“WBBN” for a Microsoft Word document.
Most files don't have HFS type or creator codes anymore, because Cocoa
apps don't usually set them. (Word probably does, because it's been
around forever.) And downloaded files generally don't have them either
unless they were encoded with StuffIt or MacBinary.
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...)
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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