Important: The information in this document is obsolete and should not be used for new development.
FSpOpenRF
You can use theFSpOpenRFfunction to open a file's resource fork.
FUNCTION FSpOpenRF (spec: FSSpec; permission: SignedByte; VAR refNum: Integer): OSErr;
spec- An
FSSpecrecord specifying the file whose resource fork is to be opened.permission- A constant indicating the desired file access permissions.
refNum- A reference number of an access path to the file's resource fork.
DESCRIPTION
TheFSpOpenRFfunction creates an access path to the resource fork of a file and returns, in therefNumparameter, an access path reference number to that fork. You can pass that reference number as a parameter to any of the low- or high-level file access routines.
Thepermissionparameter should contain a constant indicating the desired file
access permissions.SPECIAL CONSIDERATIONS
Generally, your application should use Resource Manager routines rather than File Manager routines to access a file's resource fork. TheFSpOpenRFfunction does not read the resource map into memory and is generally useful only for applications (such as utilities that copy files) that need block-level access to a resource fork. In particular, you should not use the resource fork of a file to hold nonresource data. Many parts of the system software assume that a resource fork always contains resource data.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forFSpOpenRFare
Trap macro Selector _HighLevelHFSDispatch $0003 RESULT CODES