Carbon


FSGetCatalogInfo

Header: Files.h Carbon status: Supported

Returns general information about a file or directory.

OSErr FSGetCatalogInfo (
    const FSRef *ref, 
    FSCatalogInfoBitmap whichInfo, 
    FSCatalogInfo *catalogInfo, 
    HFSUniStr255 *outName, 
    FSSpec *fsSpec, 
    FSRef *parentRef
);
ref

A pointer to the file or directory whose information is to be returned.

whichInfo

Which catalog info fields to get.

catalogInfo

On return, a pointer to a FSCatalogInfo structure containing the general information about the file or directory. Only the information specified by whichInfo is returned. If you don’t want any catalog info, set whichInfo to kFSCatInfoNone and set catalogInfo to NULL.

outName

On return, a pointer to the file or directory Unicode name is returned here. This parameter is optional; if you do not wish to receive this value, set outName to NULL.

fsSpec

On return, a pointer to the FSSpec for the object. This parameter is optional; if you do not wish to receive this value, set fsSpec to NULL.

parentRef

On return, a pointer to the FSRef for the object's parent directory. This parameter is optional; if you do not wish to receive this value, set parentRef to NULL.

If the object specified by ref is a volume’s root directory, then the ref returned in parentRef will not be a valid FSRef (since the root directory has no parent object).

function result

A result code.

AVAILABILITY

Supported in Carbon. Available in Mac OS 9, and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)