title: Determine file type in Ruby
body: <p>How does one <strong>reliably</strong> determine a file's type? File extension analysis is not acceptable. There must be a rubyesque tool similar to the UNIX file(1) command?</p>
  
  <p>This is regarding MIME or content type, not file system classifications, such as directory, file, or socket.</p>