title: Determining file extension given a FileStream
body: <p>Is there any way to know the type of the <code>FileStream</code>. I have a function that takes a <code>FileStream</code> object and I want to determine the file extension based on that <code>FileStream</code>.</p>