Contents

LSRegisterFSRef(_:_:)

Registers an app with a file-system reference in the Launch Services database.

Declaration

func LSRegisterFSRef(_ inRef: UnsafePointer<FSRef>!, _ inUpdate: Bool) -> OSStatus

Parameters

  • 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 FSRef data 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 is true, 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