• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can't get file type code using [fileAttr valueForKey:NSFileHFSTypeCode]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

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

  • Prev by Date: Re: ObjC Question - labeled arguments
  • Next by Date: Re: ObjC Question - labeled arguments
  • Previous by thread: Re: Can't get file type code using [fileAttr valueForKey:NSFileHFSTypeCode]
  • Next by thread: Re: Can't get file type code using [fileAttr valueForKey:NSFileHFSTypeCode]
  • Index(es):
    • Date
    • Thread