From: John Bentley Date: 2010-04-12T09:49:32+09:00 Subject: Re: Finding an icon for a file in Linux Riccardo Cecolin wrote: > John Bentley wrote: >> Hi, >> >> I am writing a file manager and am looking for the best way to get the >> icon for a file type. I am assuming it uses mimetypes, but I haven't >> found a good solution yet. If anyone could point me in the right >> direction I'd appreciate it. >> >> Thanks. >> > You could parse output of "file" command: > http://en.wikipedia.org/wiki/File_(command) > As far as I can tell, that will only tell me the mimetype. My main problem really is that I can't take the mimetype and use it to find the icon file. I already found the gem that will determine the mimetype. (http://mime-types.rubyforge.org/) -- Posted via http://www.ruby-forum.com/.