> Also, is there any context in which you want to know the file type but not
> actually use it?

Yes.  For example, when implementing the "accept" attribute of <input
type="file">.

More to the point, there are many cases where you need to know the file type in
one part of the code and actually use the file in a different part.   Form
submission is one such example.  Now such code could probably be rearchitected
somewhat, but the question is whether this is desirable.

Boris
-- 
Economists state their GNP growth projections to the
nearest tenth of a percentage point to prove they have a
sense of humor.
                             -- Edgar R. Fiedler

Reply via email to