LSCopyItemAttributes(_:_:_:_:)
Obtains multiple item attribute values as a dictionary.
Declaration
func LSCopyItemAttributes(_ inItem: UnsafePointer<FSRef>!, _ inRoles: LSRolesMask, _ inAttributeNames: CFArray!, _ outValues: UnsafeMutablePointer<Unmanaged<CFDictionary>?>!) -> 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. - inAttributeNames:
A
CFArrayReffor an array containing the attribute names to copy. For possible values, seeItem Attribute Constants. - outValues:
On return, a pointer a
CFDictionaryReffor a dictionary whose keys are the attribute names specified by theinAttributeNamesparameter and whose values are the attribute’s values. TheCFTypeIDof each value in the dictionary varies by attribute. SeeItem Attribute Constantsfor the data type of each value. If the item does not have a specified attribute, the key for the attribute is not in the dictionary.
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(_:_:)LSCopyItemAttribute(_:_:_:_:)LSGetExtensionInfo(_:_:_:)LSSetExtensionHiddenForRef(_:_:)LSSetExtensionHiddenForURL(_:_:)LSRegisterFSRef(_:_:)