Important: The information in this document is obsolete and should not be used for new development.
Opening Resource Forks
To open a resource fork, the Resource Manager calls the appropriate File Manager routine and returns the file reference number that it gets from the File Manager. If the file reference number returned is greater than 0, you can use this number to refer to the resource fork in some other Resource Manager routines.The
FSpOpenResFile
,HOpenResFile
,OpenRFPerm
, andOpenResFile
functions all open resource forks. Use theFSpOpenResFile
function to open a resource fork using a file system specification (FSSpec
) record. You can determine whetherFSpOpenResFile
is available by calling theGestalt
function with thegestaltFSAttr
selector code.If
FSpOpenResFile
is not available, you can useHOpenResFile
,OpenRFPerm
, orOpenResFile
to open a resource fork. TheHOpenResFile
function allows you to specify both a directory ID and a volume reference number, and is therefore preferred ifFSpOpenResFile
is not available. TheOpenRFPerm
andOpenResFile
functions are earlier versions ofHOpenResFile
that are still supported but are more restricted in their capabilities.
Subtopics
- FSpOpenResFile
- HOpenResFile
- OpenRFPerm
- OpenResFile