[Portland] Mechanism for mapping file extension to mime type?
Adam B
cruxic at gmail.com
Thu Jan 31 21:26:05 PST 2008
Hello all you glorious abstractors,
I've got a pet project where I need to guess the mime type of a file based
upon it's name extension - without actually reading the contents of the
file. As far as I can tell xdg-mime inspects the contents of the file. I
need something much faster so I can process thousands of these file names in
very little time.
(And yes I realize that there is not a 1:1 correspondence between extension
and mime type - I just need a best guess).
Can anybody point me in the right direction?
Much thanks.
- Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/portland/attachments/20080131/73d40545/attachment.htm
More information about the Portland
mailing list