Function

LSCopyKindStringForMIMEType(_:_:)

Obtains the kind string for a specified MIME type.

Declaration

func LSCopyKindStringForMIMEType(_ inMIMEType: CFString!, _ outKindString: UnsafeMutablePointer<Unmanaged<CFString>?>!) -> OSStatus

Parameters

inMIMEType

A Core Foundation string object specifying the MIME type whose kind string is requested; see the CFString Reference in the Core Foundation Reference Documentation for a description of the CFStringRef data type. Comparison of MIME types is case-insensitive.

outKindString

A pointer to a Core Foundation string object that, on return, will contain the kind string for the specified MIME type; 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 preferred application for opening items of the specified the MIME type, if one is found in the Launch Services database; otherwise, a more generic kind string is chosen.

Version-Notes

Thread-safe since Mac OS version 10.2.

See Also

Obtaining Information About an Item

func LSCopyItemInfoForRef(UnsafePointer<FSRef>!, LSRequestedInfo, UnsafeMutablePointer<LSItemInfoRecord>!) -> OSStatus

Obtains requested information about an item designated by file-system reference.

Deprecated
func LSCopyItemInfoForURL(CFURL!, LSRequestedInfo, UnsafeMutablePointer<LSItemInfoRecord>!) -> OSStatus

Obtains requested information about an item designated by URL.

Deprecated
func LSCopyDisplayNameForRef(UnsafePointer<FSRef>!, UnsafeMutablePointer<Unmanaged<CFString>?>!) -> OSStatus

Obtains the display name for an item designated by file-system reference.

Deprecated
func LSCopyDisplayNameForURL(CFURL!, UnsafeMutablePointer<Unmanaged<CFString>?>!) -> OSStatus

Obtains the display name for an item designated by URL.

Deprecated
func LSCopyKindStringForRef(UnsafePointer<FSRef>!, UnsafeMutablePointer<Unmanaged<CFString>?>!) -> OSStatus

Obtains the kind string for an item designated by file-system reference.

Deprecated
func LSCopyKindStringForURL(CFURL!, UnsafeMutablePointer<Unmanaged<CFString>?>!) -> OSStatus

Obtains the kind string for an item designated by URL.

Deprecated
func LSCopyKindStringForTypeInfo(OSType, OSType, CFString!, UnsafeMutablePointer<Unmanaged<CFString>?>!) -> OSStatus

Obtains a kind string for items with a specified file type, creator signature, filename extension, or any combination of these characteristics.

Deprecated