• 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: Best way to discover resource forks?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to discover resource forks?


  • Subject: Re: Best way to discover resource forks?
  • From: Chris Suter <email@hidden>
  • Date: Wed, 12 Jul 2006 06:47:14 +1000


On 12/07/2006, at 5:40 AM, Steve Christensen wrote:
If you're trying to determine if a file contains resources (in either fork), you'd need to try opening the fork(s) using Resource Manager APIs, which would be considerably more time consuming.

I don't believe you need to open the file to find out if a file contains resources.


You can use the BSD function getattrlist. On Tiger you can also the BSD extended attribute API. See man pages for getattrlist and listxattr. The extended attribute name for the resource fork is defined by the constant XATTR_RESOURCEFORK_NAME (defined in /usr/ include/sys/xattr.h).

You can also access resource forks as if they are regular files by appending "/..namedfork/rsrc" to the name of the file. You may need to check when this was introduced if you need it to work on older systems.

- Chris

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Best way to discover resource forks?
      • From: Steve Christensen <email@hidden>
References: 
 >Best way to discover resource forks? (From: Scott Ellsworth <email@hidden>)
 >Re: Best way to discover resource forks? (From: Ryan Britton <email@hidden>)
 >Re: Best way to discover resource forks? (From: Steve Christensen <email@hidden>)

  • Prev by Date: Data Model Design Q: Translation
  • Next by Date: Re: Best way to discover resource forks?
  • Previous by thread: Re: Best way to discover resource forks?
  • Next by thread: Re: Best way to discover resource forks?
  • Index(es):
    • Date
    • Thread