LSCopyItemAttribute(_:_:_:_:)
Obtains the value of an item’s attribute.
Declaration
func LSCopyItemAttribute(_ inItem: UnsafePointer<FSRef>!, _ inRoles: LSRolesMask, _ inAttributeName: CFString!, _ outValue: UnsafeMutablePointer<Unmanaged<CFTypeRef>?>!) -> OSStatusParameters
- inItem:
The
FSRefof the item to query. - inRoles:
The roles. When obtaining attributes related to document binding (such as
kLSItemRoleHandlerDisplayName), at least one of the roles must be provided by the application selected. PasskLSRolesAllif any role is acceptable. - inAttributeName:
The name of the attribute to copy. For possible values, see
Item Attribute Constants. - outValue:
A pointer to a
CFTypeRef. On return, theCFTypeRefis set to the copied attribute value (a CF object), or isNULLif an error occurs. The type of the returned object varies depending on the attribute that is requested.
Return Value
A result code; see Result Codes.
Discussion
Thread-safe since OS X v10.4.
See Also
Deprecated Functions
LSGetHandlerOptionsForContentType(_:)LSSetHandlerOptionsForContentType(_:_:)LSCopyAllHandlersForURLScheme(_:)LSCopyDefaultHandlerForURLScheme(_:)LSGetApplicationForItem(_:_:_:_:)LSGetApplicationForURL(_:_:_:_:)LSGetApplicationForInfo(_:_:_:_:_:_:)LSCopyApplicationForMIMEType(_:_:_:)LSCanRefAcceptItem(_:_:_:_:_:)LSFindApplicationForInfo(_:_:_:_:_:)LSOpenApplication(_:_:)LSOpenItemsWithRole(_:_:_:_:_:_:_:)LSOpenURLsWithRole(_:_:_:_:_:_:)LSOpenFSRef(_:_:)LSOpenFromRefSpec(_:_:)LSCopyItemInfoForRef(_:_:_:)LSCopyItemInfoForURL(_:_:_:)LSCopyDisplayNameForRef(_:_:)LSCopyDisplayNameForURL(_:_:)LSCopyKindStringForRef(_:_:)LSCopyKindStringForURL(_:_:)LSCopyKindStringForTypeInfo(_:_:_:_:)LSCopyKindStringForMIMEType(_:_:)LSCopyItemAttributes(_:_:_:_:)LSGetExtensionInfo(_:_:_:)LSSetExtensionHiddenForRef(_:_:)LSSetExtensionHiddenForURL(_:_:)LSRegisterFSRef(_:_:)