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 / Resolving File ID References


PBResolveFileIDRef

You can use the PBResolveFileIDRef function to retrieve the filename and parent directory ID of the file with a specified file ID.

FUNCTION PBResolveFileIDRef (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
The PBResolveFileIDRef function returns the filename and parent directory ID of the file referred to by file ID in the ioFileID field. It places the filename in the string pointed to by the ioNamePtr field and the parent directory ID in the ioSrcDirID field. If the name string is NIL, PBResolveFileIDRef returns only the parent directory ID. If the name string is not NIL but is only a volume name, PBResolveFileIDRef ignores the value in the ioVRefNum field, uses the volume name instead, and overwrites the name string with the filename. A return code of fidNotFoundErr means that the specified file ID reference has become invalid, either because the file was deleted or because the file ID reference was destroyed by PBDeleteFileIDRef.

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

RESULT CODES
noErr0No error
nsvErr-35Volume not found
ioErr-36I/O error
fnfErr-43File not found
paramErr-50Function not supported by volume
volOfflinErr-53Volume is offline
extFSErr-58External file system
wrgVolTypErr-123Not an HFS volume
fidNotFoundErr-1300File ID not found
notAFileErr-1302Specified file is a directory
afpAccessDenied-5000User does not have the correct access
afpObjectTypeErr-5025Specified file is a directory
afpIDNotFound-5034File ID not found
afpBadIDErr-5039File ID not found

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996