title: Getting Original Path from FileStream
body: <p>Given a <code>System.IO.FileStream</code> object, how can I get the original path to the file it's providing access to?</p>
  
  <p>For example, in the <code>MyStreamHandler()</code> function below, I want to get back the path of the file that created the <code>FileStream</code>:</p>
  
  <pre><code>public static void Main() 
  {
      string path = @"c:\temp\MyTest.txt";
      FileStream fs = File.Create(path));
  
      MyStreamHandler(fs);
      MyOtherStreamHandler(fs);
  
      fs.Close();
      fs.Dispose();
  }
  
  private static void MyStreamHandler(FileStream fs)
  {
      // Get the originating path of 'fs'
  } 
  
  private static void MyOtherStreamHandler(FileStream fs)
  {
  }
  </code></pre>