LSCopyDisplayNameForURL(_:_:)
Obtains the display name for an item with a URL.
Declaration
func LSCopyDisplayNameForURL(_ inURL: CFURL!, _ outDisplayName: UnsafeMutablePointer<Unmanaged<CFString>?>!) -> OSStatusParameters
- inFileURL:
A Core Foundation URL reference designating the item whose display name is requested; see the CFURL Reference in the Core Foundation Reference Documentation for a description of the
CFURLRefdata type. The URL must have schemefileand contain a valid path to either a file or a directory. - outDisplayName:
A pointer to a Core Foundation string object that, on return, will contain the item’s display name; see the CFString Reference in the Core Foundation Reference Documentation for a description of the
CFStringRefdata type. You are responsible for releasing this object.
Return Value
A result code; see Result Codes.
Discussion
The item’s display name is returned in the form in which it will appear on the user’s screen; it may be localized (for applications and folders), and it excludes the filename extension if the extension is set to be hidden and the Finder preference to always show extensions is not enabled.
Version-Notes
Thread-safe since Mac OS version 10.2.
See Also
Deprecated Functions
LSGetHandlerOptionsForContentType(_:)LSSetHandlerOptionsForContentType(_:_:)LSCopyAllHandlersForURLScheme(_:)LSCopyDefaultHandlerForURLScheme(_:)LSGetApplicationForItem(_:_:_:_:)LSGetApplicationForURL(_:_:_:_:)LSGetApplicationForInfo(_:_:_:_:_:_:)LSCopyApplicationForMIMEType(_:_:_:)LSCanRefAcceptItem(_:_:_:_:_:)LSFindApplicationForInfo(_:_:_:_:_:)LSOpenApplication(_:_:)LSOpenItemsWithRole(_:_:_:_:_:_:_:)LSOpenURLsWithRole(_:_:_:_:_:_:)LSOpenFSRef(_:_:)LSOpenFromRefSpec(_:_:)LSCopyItemInfoForRef(_:_:_:)LSCopyItemInfoForURL(_:_:_:)LSCopyDisplayNameForRef(_:_:)LSCopyKindStringForRef(_:_:)LSCopyKindStringForURL(_:_:)LSCopyKindStringForTypeInfo(_:_:_:_:)LSCopyKindStringForMIMEType(_:_:)LSCopyItemAttribute(_:_:_:_:)LSCopyItemAttributes(_:_:_:_:)LSGetExtensionInfo(_:_:_:)LSSetExtensionHiddenForRef(_:_:)LSSetExtensionHiddenForURL(_:_:)LSRegisterFSRef(_:_:)