title: Is there a safe way of detecting File access permissions
body: <p>Below is the part code I currently use to write to a file, </p>
  
  <pre><code>Try
      Using sWriter As New IO.StreamWriter("C:\Tmp.txt", False)
          sWriter.Write(m_Buffer.ToString) : sWriter.Flush()
      End Using
          Return True
  Catch ex As IOException
  
  End Try
  </code></pre>
  
  <p>but some time this results in error</p>
  
  <pre><code>Access to the path 'C:\Tmp.txt' is denied
  </code></pre>
  
  <p>My question is, Is there a safe way of detecting File access permissions, without handling exceptions, I mean if I can some how check before opening a file for any filehandle opened for it. </p>
  
  <p>I think I have made my point. 
  Thanks in Advance</p>