Obtains a kind string for items with a specified file type, creator signature, filename extension, or any combination of these characteristics.
- macOS 10.2–10.10Deprecated
- Core Services
The file type to consider. Comparison of file types is case-sensitive. Pass
kif the items’ file type is unimportant.
The creator signature to consider. Comparison of creator signatures is case-sensitive. Pass
kif the items’ creator signature is unimportant.
A Core Foundation string object specifying the filename extension to consider; see the CFString Reference in the Core Foundation Reference Documentation for a description of the
CFStringdata type. Comparison of filename extensions is case-insensitive. Pass
NULLif the items’ filename extension is unimportant.
A pointer to a Core Foundation string object that, on return, will contain the requested kind string; see the CFString Reference in the Core Foundation Reference Documentation for a description of the
CFStringdata type. You are responsible for releasing this object.
A result code; see Result Codes.
This function obtains the kind string that most closely describes items having the specified characteristics. It is useful when you want to display the kind string for a document you do not yet have (such as an email attachment).
You can request any combination of one, two, or all three of the characteristics specified by the
in parameters; at least one of these characteristics must be supplied. The kind string (which may be localized) is obtained from the preferred application for opening such items, if one is found in the Launch Services database; otherwise, a more generic kind string is chosen. For example, the kind string might be
Frame, or just
Document if no suitable application is found.
Note that since the choice of a preferred application is subject to any document binding preferences the user may have set, the kind string will not necessarily be obtained from the default application that matches the specified creator signature (if any), but may instead be taken from a user-specified application that overrides the default. For example, if the user has specified that files of type
'ACRO' should be opened in the Preview application rather than in Acrobat, the kind string for this combination of characteristics will be that defined for
'PDF ' files by Preview and not by Acrobat.
Thread-safe since Mac OS version 10.2