Re: Resource Fork - is this a good use/the right thing to do?
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 21:53:50 -0400
You may want to look at the size limits on resource forks, though. I
thought I'd blogged about that ages ago, but can't find the posting
right now. The resource fork format is documented, though, so it
shouldn't be too hard to figure out. There's for example a 2727
resources limit on each file, and some offsets are 16-bit
quantities. So, it's not really a good idea to have resources of
several megabytes in size.
I'm pretty sure the resource fork size limits are rather large... EV
Nova's data files, in which everything is stored in the resource fork,
go up to 13.8 MB. Also, it's a definite advantage that the resource
fork is well-documented. That's more than one can say for xattrs,
which are best documented in the OSXBook over a grand total of 3 pages.
But the resource fork idea has the same issue if someone uses/sends/
writes
to the file from the other 90% of the computers on the planet...
(windows).
Doesn't it?
I don't think it does... doesn't NTFS have support for arbitrary named
forks as well? At least to the point that it doesn't overwrite other
forks when the data fork is written to? I mean, Windows can't read or
write to them, AFAIK, but the low-level read/write routines should
preserve it. I may be completely off base here, as I think I'm quoting
a blog post, which may or may not have been a wishlist for Windows
behavior. :-p
To be more safe/compatible you could actually save the UUID as an
extended attribute as well in a resource. When reading use either
and reconsruct the missing one if necessary and possible.
Unfortunately, as Uli pointed out, it's no longer unique if the file
is duplicated. So I think that approach is out.
-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