Article 6J1VN Obtaining list of mimetypes and the file names of their icons

Obtaining list of mimetypes and the file names of their icons

by
Java programmer
from LinuxQuestions.org on (#6J1VN)
When I am looking at files in Linux's file explorer, each file has an icon on the left and a name on the right.
The icons represent the mimetype of the file , for example .so. .sh or .properties.

I want to present something like Linux's file explorer to my users. In connection with this, I want to show them the appropriate icon they expect to see next to each file, according to its mime type, like Linux does.

I would like to pre-assemble each of these icons and associate (map) them to their mimetypes exactly once when the program starts, rather query Linux for the icon for each and every file as I discover those files when my program starts up.

I do not know how to assemble this infornation for myself even through I can see Linux obviously knows how to do it.

I am wondering how I would go about doing this on an arbitrary but modern Linux.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments