MacOSX - File extension associate with application - Programmatically
问题 I\'m trying to get my program to automatically associate certain file extensions to be opened by it but I\'m not sure how to do that in MacOSX. I\'m not asking how to associate a program with a file extension in the GUI, I want to be able to program it into my program. 回答1: To register a new file extension with an application use the following defaults command. Replace PUT_FILE_EXTENSION_HERE_WITHOUT_PERIOD with the file extension i.e. txt. Replace org.category.program with the com/org name