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
High-Level HFS Routines / Accessing Information About Files and Directories


HSetFInfo

You can use the HSetFInfo function to set the Finder information for a file.

FUNCTION HSetFInfo (vRefNum: Integer; dirID: LongInt; 
                     fileName: Str255; 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 HSetFInfo function changes the Finder information stored in the volume's catalog for a file. HSetFInfo changes 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
noErr0No error
nsvErr-35No such volume
ioErr-36I/O error
bdNamErr-37Bad filename
fnfErr-43File not found
wPrErr-44Hardware volume lock
fLckdErr-45File is locked
vLckdErr-46Software volume lock
dirNFErr-120Directory not found or incomplete pathname
afpAccessDenied-5000User does not have the correct access
afpObjectTypeErr-5025Object was a directory

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996