HGetFInfo
You can use the HGetFInfo function to obtain the Finder information for a file.
FUNCTION HGetFInfo (vRefNum: Integer; dirID: LongInt;
fileName: Str255; VAR fndrInfo: FInfo):
OSErr;
vRefNum
- A volume reference number, a working directory reference number, or
0 for the default volume.
dirID
- A directory ID.
fileName
- The name of the file.
fndrInfo
- Information used by the Finder.
DESCRIPTION
The HGetFInfo function returns the Finder information stored in the volume's catalog for a file. The HGetFInfo function returns only the original Finder information--the FInfo record, not FXInfo. (See the chapter "Finder Interface" in Inside Macintosh: Macintosh Toolbox Essentials for a discussion of Finder information.)
RESULT CODES
| noErr | 0 | No error |
| nsvErr | -35 | No such volume |
| ioErr | -36 | I/O error |
| bdNamErr | -37 | Bad filename |
| fnfErr | -43 | File not found |
| paramErr | -50 | No default volume |
| dirNFErr | -120 | Directory not found or incomplete pathname |
| afpAccessDenied | -5000 | User does not have the correct access |
| afpObjectTypeErr | -5025 | Directory not found or incomplete pathname |