Does anyone know an easy way to determine a files' type (i.e. text/html, image/png, application/x-tar, etc.) stat() doesn't seem to get what I'm looking for. I have the filename, but I can use a handle if need be.
I'm listing files in a directory, and I want to match the appropriate icons with the right files.
Any ideas?