|
|
|
|
|
by klodolph
455 days ago
|
|
I’m really fond of the way macOS does this, which is to stick this information in the executable. Back in the day, this worked via a flag in the metadata for each file. When you got a new executable, the flag was unset. The OS would see a file with an unset flag, ask “Is this an executable? What files can it open?” and then add this information to a database called the desktop database. This is why file associations work on a Mac without an installer, and without writing any code (you just have to write the code for “open file in response to OS request”). |
|
This is why merely having a copy of an app is enough to make QuickLook able to preview the filetypes the app is capable of opening. The system picks up the QuickLook extension in the app bundle and enables it.
It’s not perfect since small .plist config files get left behind, but it’s a whole lot more clean by default compared to the Windows approach.