Is there a way I can get the MIME type (text/plain for example) of a file? I am outputting a path to an icon for plain text, binary, etc., but I have to check each file's extension do I was wondering if there was something to do that.