Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Resource fork
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Accessing == Resource forks appear as the [[Extended file attributes|extended attribute]] com.apple.ResourceFork.<ref>{{cite web|url=http://jonsview.com/mac-os-x-resource-forks |website=Jon's View |date=August 21, 2009 |first1=Jon |last1=Stacey |title=Mac OS X Resource Forks|access-date=2012-10-22}}</ref> Previously resource forks were accessed via the 'Resource Manager' [[API]]. This API is now deprecated.<ref>{{cite web|url=https://developer.apple.com/library/mac/#documentation/Carbon/Reference/Resource_Manager/Reference/reference.html |website=Apple Developer |title=Resource Manager Reference|access-date=2012-10-22 |url-status=dead |archive-url=https://web.archive.org/web/20121025153620/https://developer.apple.com/library/mac/#documentation/Carbon/Reference/Resource_Manager/Reference/reference.html |archive-date= Oct 25, 2012 }}</ref> Under the deprecated API: # When a resource fork is accessed, data including the start position and length of the resource data and resource map is read in from the header. # If a resource type to read in has been specified, a check is performed to make sure that type is present in the resource list, and the number of items of data containing that type and their offsets in the resource reference list from the start position of the resource map is found. # The resource ID, the offset of the resource name, the resource properties, and the offset of the data from the start position of the resource data is found. # If resource data with the specified ID or name is present in the resource data, the offset obtained above is accessed, the data length is found, and all the data stored there is read in, and returned as the return value. File Manager APIs such as <code>PBOpenRF()</code> also allowed access to the raw resource fork; however, they should be used only for applications such as copying a file{{snd}} Apple strongly warns against using the resource fork as a "second data fork." From the [[POSIX]] interface, the resource fork could be accessed as <code>''filename''/..namedfork/rsrc</code> or as <code>''filename''/rsrc</code>; the shorter form was deprecated in [[Mac OS X v10.4]] and removed completely in [[Mac OS X v10.7]].<ref>{{Cite web|url=http://developer.apple.com/techpubs/macosx/Essentials/Performance/FilesNetworksThreads/Using_Pathnames.html|title=Using Pathnames|date=March 31, 2001 |website=Apple Developer |access-date=2002-12-18|url-status=dead|archive-url=https://web.archive.org/web/20021218054520/http://developer.apple.com/techpubs/macosx/Essentials/Performance/FilesNetworksThreads/Using_Pathnames.html|archive-date=2002-12-18}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)