Important: The information in this document is obsolete and should not be used for new development.
FSpOpenDF
You can use theFSpOpenDF
function 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
TheFSpOpenDF
function opens the data fork of the file specified by thespec
parameter and returns a file reference number in therefNum
parameter. You can pass that reference number as a parameter to any of the low- or high-level file access routines.The
permission
parameter specifies the kind of access permission mode you want.
In most cases, you can simply set thepermission
parameter 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 forFSpOpenDF
are
Trap macro Selector _HighLevelHFSDispatch $0002 RESULT CODES