• 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: Resource Fork - is this a good use/the right thing to do?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resource Fork - is this a good use/the right thing to do?


  • Subject: Re: Resource Fork - is this a good use/the right thing to do?
  • From: Daniel DeCovnick <email@hidden>
  • Date: Wed, 23 Apr 2008 03:41:40 -0400


On Apr 23, 2008, at 2:07 AM, Jens Alfke wrote:


On 22 Apr '08, at 10:21 PM, Daniel DeCovnick wrote:

Through a lot of thought experiments, I've come to the conclusion that the best place to save this sort of thing would be in the resource fork of the file being opened, but I could be totally off the mark there, and it's certainly an unorthodox thing to do.

It would have been the right thing to do ten years ago. But these days resource forks are definitely a legacy feature and it would be a bad idea to write new software that relies on them.


Have you looked at Extended Attributes? They're kind of the moral equivalent of resources, but they're newer, lighter-weight and better integrated into the filesystem. I don't know if there's any in-depth documentation, but you can start by reading the man pages for getxattr, setxattr, et al.


Thanks for the suggestion. I've just looked through them now, as well as at the OSXBook (Mac OS X Internals: A Systems Approach by Amit Singh) info on that. In theory it looks good, but it's somewhat confusing. It looks like, at least in 10.4, except for the resource fork which is mapped as a fake xattr, you can only have inline attributes, with a length limit of 3802 bytes, and it would be quite common for my data to be significantly larger than that. Does anyone know if that's changed for 10.5?


Option 3. Add my own Metadata key and put an XML or similarly textual version of my graphical rep as the string. I have no idea whether or not this is possible. It seems like a bad abuse of the metadata system in any case.

This seems reasonable. It's the same way that the Finder stores comments, which is analogous to what you're doing.



I dunno... it just seems that there's nowhere that the metadata system isn't integrated with Spotlight, and here, it wouldn't be. Seems to violate the spirit a bit. Still, it probably meets all the requirements.


Thanks for the suggestions,
Dan

_______________________________________________

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: Resource Fork - is this a good use/the right thing to do?
      • From: Uli Kusterer <email@hidden>
    • Re: Resource Fork - is this a good use/the right thing to do?
      • From: "Adam R. Maxwell" <email@hidden>
    • Re: Resource Fork - is this a good use/the right thing to do?
      • From: Rob Keniger <email@hidden>
References: 
 >Resource Fork - is this a good use/the right thing to do? (From: Daniel DeCovnick <email@hidden>)
 >Re: Resource Fork - is this a good use/the right thing to do? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Inserting my own Responder before App?
  • Next by Date: Re: Inserting my own Responder before App?
  • Previous by thread: Re: Resource Fork - is this a good use/the right thing to do?
  • Next by thread: Re: Resource Fork - is this a good use/the right thing to do?
  • Index(es):
    • Date
    • Thread