Re: Resource Fork as Extended Attributes
Re: Resource Fork as Extended Attributes
- Subject: Re: Resource Fork as Extended Attributes
- From: Terry Lambert <email@hidden>
- Date: Tue, 21 Jul 2009 01:58:54 -0700
<http://developer.apple.com>
For resources, search for FileCopy.c and/or FSOpenResFile.
For extended attributes, man listxattr, getxattr, setxattr.
You can't safely assume that the implementation details of a given
filesystem would unify the namespace between the two, or that you can
use the same APIs for everything.
In addition, there is name-space folding for certain extended
attributes, like those used to store ACLs on HFS+, so you simply can
not read them out or set them, you have to use the ACL APIs instead.
Again, that's just an implementation detail for HFS+, so you can't
expect to use the same APIs for everything (again).
-- Terry
On Jul 20, 2009, at 11:39 PM, shailesh jain wrote:
@Terry:
Except for Apple TN1150 (I haven't read in entirety), all places
that I have referred wikipedia, Mac OSX internals by amit singh and
private communications with other folks suggest that arbitrary
number of forks are supported. (with limitations on size ? ..
so still not as full fledged as named streams on NTFS)
Ok, I failed to find on google. Is there a place where I can lookup
API's to access resource forks (any number of). ( I know that
through extended attribute interface, I can access resource fork) ?
Shailesh Jain
On Wed, Jul 15, 2009 at 8:15 PM, Terry Lambert <email@hidden>
wrote:
On Jul 15, 2009, at 6:00 PM, shailesh jain wrote:
TN1150 says following:
"HFS Plus has an attribute file, another B-tree, that can be used to
store additional information for a file or directory. Since it is
part of the volume format, this information can be kept with the
file or directory as is it moved or renamed, and can be deleted when
the file or directory is deleted. The contents of the attribute
file's records have not been fully defined yet, but the goal is to
provide an arbitrary number of forks, identified by Unicode names,
for any file or directory."
Does that mean HFS+ now supports arbitrary number of forks rather
that just 'data fork + resource fork' ? And arbitrary number of
forks can be accessed by getxattr and friends ?
I think "The contents of the attribute file's records have not been
fully defined yet" is pretty clear...
-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden