I know that resource forks are deprecated in Mac OS X.
It's not clear whether the less well known and little used named forks are also deprecated. HFS+ actually supports an arbitrary number of arbitrary length forks for any file. (Mac's named forks are conceptually similar to Windows's alternate data streams or "ADS".)
Deprecated or not there's still reasons to learn about creating, enumerating, removing, and otherwise manipulating file forks.
Yet I can't seem to find anything about the APIs for working with forks.
All I can find is that from the terminal and perhaps other places that accept filenames or paths you can access the resource fork with the syntax <filename>/..namedfork/rsrc and until recently also <filename>/rsrc. I have tried replacing rsrc with other names but all the commands I tried in the terminal failed.
Where can I find old or unofficial documentation on the APIs to work with named forks in OS X programatically?
By the way there seems to be a common misunderstanding on the internet when Googling this topic. Random punters are saying that named forks are built on named file attributes. This is not so. Named file attributes are a fairly new OS X feature. Named forks predate OS X. It seems that in fact named file attributes could well be using named forks behind the scenes.
In any case, please don't submit answers about named file attributes. I am specifically seeking information on arbitrary named forks.
There is some description of named forks in section 12.7.4. "The Attributes File"
My old answer is wrong! Three years later there is now more information on the internet, including mirrors of old and deprecated Apple developer documentation.
Here's a selection of the APIs for named forks I've found:
Opening Files
FSOpenForkOpens any fork of a file or directory for streaming access.PBOpenForkSyncOpens any fork of a file or directory for streaming access.PBOpenForkAsyncOpens any fork of a file or directory for streaming access.Creating and Deleting Named Forks
FSCreateForkCreates a named fork for a file or directory.PBCreateForkSyncCreates a named fork for a file or directory.PBCreateForkAsyncCreates a named fork for a file or directory.FSDeleteForkDeletes a named fork from a file or directory.PBDeleteForkSyncDeletes a named fork from a file or directory.PBDeleteForkAsyncDeletes a named fork of a file or directoryIterating Over Named Forks
FSIterateForksDetermines the name and size of every named fork belonging to a file or directory.PBIterateForksSyncDetermines the name and size of every named fork belonging to a file or directory.PBIterateForksAsyncDetermines the name and size of every named fork belonging to a file or directoryManipulating File and Fork Size
FSGetForkSizeReturns the size of an open fork.PBGetForkSizeSyncReturns the size of an open fork.PBGetForkSizeAsyncReturns the size of an open fork.FSSetForkSizeChanges the size of an open fork.PBSetForkSizeSyncChanges the size of an open fork.PBSetForkSizeAsyncChanges the size of an open fork.Core Services Framework Reference