Important: The information in this document is obsolete and should not be used for new development.
FSpOpenDF
You can use theFSpOpenDFfunction to open a file's data fork.
FUNCTION FSpOpenDF (spec: FSSpec; permission: SignedByte; VAR refNum: Integer): OSErr;
spec- An FSSpec record specifying the file whose data 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 data fork.
DESCRIPTION
TheFSpOpenDFfunction opens the data fork of the file specified by thespecparameter and returns a file reference number in therefNumparameter. You can pass that reference number as a parameter to any of the low- or high-level file access routines.The
permissionparameter specifies the kind of access permission mode you want.
In most cases, you can simply set thepermissionparameter tofsCurPerm. Some applications requestfsRdWrPerm, to ensure that they can both read from and write
to a file. For more information about permissions, see "File Manipulation" on page 2-7. In shared environments, permission requests are translated into the deny mode permissions defined by AppleShare.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forFSpOpenDFare
Trap macro Selector _HighLevelHFSDispatch $0002 RESULT CODES