Contents

LSCopyKindStringForRef(_:_:)

Obtains the kind string for an item with a file-system reference.

Declaration

func LSCopyKindStringForRef(_ inFSRef: UnsafePointer<FSRef>!, _ outKindString: UnsafeMutablePointer<Unmanaged<CFString>?>!) -> OSStatus

Parameters

  • inFSRef:

    A pointer to a file-system reference designating the item whose kind string is requested; see the File Manager Reference in the Carbon File Management Documentation for a description of the FSRef data type.

  • outKindString:

    A pointer to a Core Foundation string object that, on return, will contain the item’s kind string; see the CFString Reference in the Core Foundation Reference Documentation for a description of the CFStringRef data type. You are responsible for releasing this object.

Return Value

A result code; see Result Codes.

Discussion

The kind string (which may be localized) is obtained from the item’s preferred application, if one is found in the Launch Services database; otherwise, a more generic kind string is chosen. For example, the kind string might be FrameMakerDocument, or just Document if the item is a document for which no application is found.

Version-Notes

Thread-safe since Mac OS version 10.2.

See Also

Deprecated Functions