Tests whether an application can accept (open) an item designated by URL.
- macOS 10.0+
- Core Services
A Core Foundation URL reference designating the source item (the item to test for acceptance by the target application); see the CFURL Reference in the Core Foundation Reference Documentation for a description of the
A Core Foundation URL reference designating the target application; see the CFURL Reference in the Core Foundation Reference Documentation for a description of the
CFURLRefdata type. The URL must have scheme
fileand contain a valid path to an application file or application bundle.
A bit mask specifying the target application’s desired role or roles with respect to the source item; see
LSRolesfor a description of this mask. This parameter applies only to URLs with a scheme component of
file, and is ignored for all other schemes. If the role is unimportant, pass
Flags specifying behavior to observe during the acceptance test; see
LSAcceptancefor a description of these flags.
A pointer to a Boolean value that, on return, will indicate whether the target application can accept the source item with at least one of the specified roles.
A result code; see Result Codes.
If the item URL’s scheme is
file (designating either a file or a directory), the acceptance test is based on the designated item’s filename extension, file type, and creator signature, along with the role specified by the
in parameter; otherwise, it is based on the URL scheme (such as
Thread-safe since Mac OS version 10.2.