Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Files /
Chapter 2 - File Manager / File Manager Reference
File ID Routines / Creating and Deleting File ID References


PBCreateFileIDRef

Use the PBCreateFileIDRef function to establish a file ID reference for a file.

FUNCTION PBCreateFileIDRef (paramBlock: HParmBlkPtr; 
                              async: Boolean): OSErr;
paramBlock
A pointer to an fidParam variant of the 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 filename.
-->ioVRefNumIntegerA volume specification.
-->ioSrcDirIDLongIntThe file's parent directory ID.
<--ioFileIDLongIntA file ID.

DESCRIPTION
Given a volume reference number, filename, and parent directory ID, the PBCreateFileIDRef function creates a record to hold the name and parent directory ID of the specified file. PBCreateFileIDRef places the file ID in the ioFileID field.
If a file ID reference already exists for the file, PBCreateFileIDRef supplies the file
ID but returns the result code fidExists.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for PBCreateFileIDRef are
Trap macroSelector
_HFSDispatch$0014

RESULT CODES
noErr0No error
nsvErr-35Volume not found
ioErr-36I/O error
fnfErr-43File not found
wPrErr-44Hardware volume lock
vLckdErr-46Software volume lock
paramErr-50Function not supported by volume
volOfflinErr-53Volume is offline
extFSErr-58External file system
wrgVolTypErr-123Not an HFS volume
fidExists-1301File ID already exists
notAFileErr-1302Specified file is a directory
afpAccessDenied-5000User does not have the correct access
afpObjectTypeErr-5025Specified file is a directory
afpIDExists-5035File ID already exists

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996