mimeapps is a library for detection of which applications can be used to open files of given MIME type.

Note: this is essential only for systems that follow Freedesktop specifications, i.e. Linux, BSD and some others. MS Windows and OS X have their own file type associations systems.

github repo: https://github.com/MyLittleRobo/mimeapps (examples included)
dub package: http://code.dlang.org/packages/mimeapps
Specification: https://www.freedesktop.org/wiki/Specifications/mime-apps-spec/

Use cases:

1. Building "Open with" menu.
2. Finding user preferred application for specific file type, e.g. text editor for text/plain or file manager for inode/directory. 3. Finding user preferred application to open uri, e.g. user preferred web browser for http and https links.

Related libraries:

https://github.com/MyLittleRobo/desktopfile - reading and executing .desktop files. https://github.com/MyLittleRobo/mime - parsing shared MIME type database and detecting MIME types of files.

Reply via email to