Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'file type info is not usually in the resource fork' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
file type info is not usually in the resource fork
Authored by: hayne on Nov 26, '03 05:05:14PM

Just to clarify:
The file type and creator info (that tells the Mac what application to use to open this file) is not usually stored in the resource fork. This information is stored in HFS+ as part of the "catalog" along with other metadata like the time of last modification, etc.

To prove this to yourself, take a file that has type/creator information - e.g. a file created by a Mac application, not one downloaded from elsewhere. Make a duplicate of the file in Finder and rename the file so it is named "junk", then open a Terminal window and then do the following commands:

ls -l junk/..namedfork/rsrc
cp /dev/null junk/..namedfork/rsrc

The first of the above commands shows you the resource fork of the file named "junk". If there is no resource fork, it will show up as zero size.

The second of the above commands will remove the resource fork of the file named "junk".

In spite of the resource fork being removed, you should still be able to open the file as usual by double-clicking on it in Finder.



[ Reply to This | # ]