I’m trying to figure out a way to get the same information that you
from the “content_type” method of the CGI class.
The problem is that I want to get this info from a file already in the
filesystem locally. For example, using ruby’s File.size would give me
same info as an uploaded CGI object’s size method. However, the file
“ftype” method only gives things like “file”, “directory”, etc whereas
“content_type” (what I want) gives things like “image/png”.