List of potential applications that might open the file

Is it possible to get a list of applications installed on a users computer that can be used to open a file (in my case an image), similar to the list displayed in the Finder menu "Open with ..."?

+3
source share
1 answer

Are you looking for a software or script solution? Programmatically, see Starting Services ( LSCopyAllRoleHandlersForContentType()for example). For scripting, you probably want lsregisterone that is buried in

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Support

Do not let your location in the documents fool you. This is in Carbon docs, but in fact it is CoreServices that are not out of date.

+6

Source: https://habr.com/ru/post/1711384/


All Articles