Important: The information in this document is obsolete and should not be used for new development.
PBHGetFInfo
You can use thePBHGetFInfofunction to obtain information about a file.
FUNCTION PBHGetFInfo (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. <-- ioFRefNumIntegerA file reference number. --> ioFDirIndexIntegerAn index. <-- ioFlAttribSignedByteThe file attributes. <-- ioFlFndrInfoFInfoInformation used by the Finder. <-> ioDirIDLongIntOn input, a directory ID; on output, a file ID. <-- ioFlStBlkIntegerThe first allocation block of the data fork. <-- ioFlLgLenLongIntThe logical end-of-file of the data fork. <-- ioFlPyLenLongIntThe physical end-of-file of the data fork. <-- ioFlRStBlkIntegerThe first allocation block of the resource fork. <-- ioFlRLgLenLongIntThe logical end-of-file of the resource fork. <-- ioFlRPyLenLongIntThe physical end-of-file of the resource fork. <-- ioFlCrDatLongIntThe date and time of creation. <-- ioFlMdDatLongIntThe date and time of last modification. DESCRIPTION
If the value ofioFDirIndexis positive, thePBHGetFInfofunction returns information about the file whose directory index isioFDirIndexon the volume specified byioVRefNumin the directory specified byioDirID. You should callPBHGetFInfojust beforePBHSetFInfo, so that the current information is present
in the parameter block.
If the value of
- Note
- If a working directory reference number is specified in
ioVRefNum, the File Manager returns information about the file whose directory index isioFDirIndexin the specified directory.![]()
ioFDirIndexis negative or 0, thePBHGetFInfofunction returns information about the file having the name pointed to byioNamePtron the volume specified byioVRefNum. If the file is open, the reference number of the first access path found is returned inioFRefNum, and the name of the file is returned inioNamePtr(unlessioNamePtrisNIL).ASSEMBLY-LANGUAGE INFORMATION
The trap macro forPBHGetFInfois_HGetFileInfo.RESULT CODES