LSRegisterFSRef(_:_:)
Registers an app with a file-system reference in the Launch Services database.
Declaration
func LSRegisterFSRef(_ inRef: UnsafePointer<FSRef>!, _ inUpdate: Bool) -> OSStatusParameters
- inRef:
A pointer to a file-system reference designating the application to be registered; see the File Manager Reference in the Carbon File Management Documentation for a description of the
FSRefdata type. - inUpdate:
A Boolean value specifying whether Launch Services should update existing information registered for the application, if any. If this parameter is
false, the application will not be registered if it has already been registered previously and its current modification date has not changed from when it was last registered; if the parameter istrue, the application’s registered information will be updated even if its modification date has not changed.
Return Value
A result code; see Result Codes.
Discussion
This function adds the designated application and its document and URL claims (if any) to the Launch Services database, making the application a candidate for document and URL binding.
Version-Notes
Thread-safe since Mac OS version 10.3.
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(_:_:_:_:)LSCopyItemAttributes(_:_:_:_:)LSGetExtensionInfo(_:_:_:)LSSetExtensionHiddenForRef(_:_:)LSSetExtensionHiddenForURL(_:_:)