Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I think there is some general confusion on the relation between all four of these items scattered throughout the web. I wanted to get this straightened out.

  1. Are named forks the same as extended attributes? If not, what are extended attributes?
  2. Is the resource fork still implemented as a fork or as an extended attribute? If it is implemented some other way, then how?
  3. The metadata stored with a file (creator, date modified...) is there any relation or overlap in terminology between the other three mentioned. An example would be, are extended attributes just extra metadata pairs (key + value) stored on a file.

Any answers that can clarify how all four of these are interrelated, especially regarding the three question would be greatly appreciated, and contribute to settling disputes I see occurring across different resources.

share|improve this question
    
For learning about HFS Plus: fileXray User Guide and Reference (PDF, 1.8 MB, 173 pages) is very useful. I'm a user of fileXray. Also: Technical Note TN1150: HFS Plus Volume Format is legacy, retired by Apple, but still useful for many purposes. –  Graham Perrin Dec 25 '12 at 7:00
add comment

1 Answer

up vote 5 down vote accepted

Confusion arises from the fact that the relationship between these concepts is complex and has changed over time. In current systems the difference between a named fork and an extended attribute is largely academic.

For an extended attribute, the actual data is stored in the attribute data record.

For a fork, what's stored is the list of disk allocation blocks that contain the data. A resource fork is still a fork.

Basic file system metadata is stored in dedicated elements of the file system record itself, independent of the attributes and named fork references.

share|improve this answer
    
But is an extended attribute actually stored as it's own fork, or is there a fork for extended attributes? How is it related in the most recent version of OSX? –  rubixibuc Feb 16 '12 at 20:27
    
I don't understand, when you say attribute do u mean "extended attribute." If so where is the attribute record kept. Is it stored as part of the file system structure HFS+ or is stored in some sort of database? Please respond to the first comment as well when you can. –  rubixibuc Feb 17 '12 at 4:10
2  
Sorry. I'm not here frequently and didn't see your follow-up questions until I came here looking for something else. An extended attribute is a named fork. I was using attribute as shorthand for "extended attribute." The attribute records are kept in a private part of the file system called the attributes tree. You could consider it a form of database. The data for each attribute may or may not be in that tree depending on how large it is. –  GregW Mar 21 '12 at 12:39
    
"… file system metadata is stored in dedicated elements of the file system record …" – instead, I'd probably say "… file metadata is stored in dedicated elements of the record for the file …" –  Graham Perrin Dec 25 '12 at 6:35
    
Maybe worth nothing that whilst com.apple.FinderInfo may appear as an extended attribute, Extended Finder Info (typically date_added, extended_flags plus three reserved fields) is not an extended attribute. –  Graham Perrin Dec 25 '12 at 6:46
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.