The gnome & kde desktop seem to have icon information under /usr/share/icons.

For my dodgy web server, I used the following code to determine the
mime type, which was lazy, and probably you need the opposite
direction.

/* Let the mime type code be handled as a small method. */
/* Later could use /etc/mime.types */
::method getmimetype
file = self~file()
parse var file fname'.'ftype .
select
        when ftype = 'html' then mtype = 'text/html; charset=iso-8859-1'
        when ftype = 'xml' then mtype = 'text/xml; charset=iso-8859-1'
        when ftype = 'css' then mtype = 'text/css; charset=iso-8859-1'
        when ftype = 'png' then mtype = 'image/png'
        when ftype = 'ico' then mtype = 'image/x-icon'
        when ftype = 'jpg' then mtype = 'image/jpg'
        otherwise mtype = 'application/octet-stream'
end
return mtype

HTH

Mike

On Sun, Oct 11, 2009 at 3:31 PM, Rony G. Flatscher
<[email protected]> wrote:
>
> Mike Protts wrote:
>> The association is looser on UNIX type systems, because the extension
>> is not so important (binaries generally don't have one).  The file
>> /etc/magic uses the first part of the file to identify what the
>> contents really are.  The file /etc/mime.types uses extensions to work
>> out internet file types.  The window manager or file manager would be
>> responsible for associating programs with files, so their man pages
>> would be the place to look.
>>
> Thank you, Mike! Any chance that you have tumbled over any scripts that
> would uncover for some Unixes of what needs to be done?
>
> ---rony
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to