Important: The information in this document is obsolete and should not be used for new development.
PBHOpenDF
You can use thePBHOpenDFfunction to open the data fork of a file.
FUNCTION PBHOpenDF (paramBlock: HParmBlkPtr; async: Boolean): OSErr;
paramBlock- A pointer to a basic HFS parameter block.
async- A Boolean value that specifies asynchronous (
TRUE) or synchronous (FALSE) execution.
--> ioCompletionProcPtrA pointer to a completion routine. <-- ioResultOSErrThe result code of the function. --> ioNamePtrStringPtrA pointer to a pathname. --> ioVRefNumIntegerA volume specification. <-- ioRefNumIntegerA file reference number. --> ioPermssnSignedByteThe read/write permission. --> ioDirIDLongIntA parent directory ID. DESCRIPTION
ThePBHOpenDFfunction creates an access path to the data fork of a file and returns a file reference number in theioRefNumfield.PBHOpenDFis exactly like thePBHOpenfunction except thatPBHOpenDFallows you to open a file whose name begins with
a period (.).You can open a path for writing even if it accesses a file on a locked volume, and no error is returned until a
PBWrite,PBSetEOF, orPBAllocatecall is made.If you attempt to open a locked file for writing,
PBHOpenDFreturns the result codepermErr. If you request exclusive read/write permission but another access path
is already open,PBHOpenDFreturns the reference number of the existing access path
inioRefNumandopWrErras its function result. You should not use this reference
number unless your application originally opened the file.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forPBHOpenDFare
Trap macro Selector _HFSDispatch $001A RESULT CODES