title: Getting files recursively: skip files/directories that cannot be read?
body: <p>I want to get all of the files in a directory in an array (including the files in subfolders)</p>
  
  <pre><code>string[] filePaths = Directory.GetFiles(@"c:\",SearchOption.AllDirectories);     
  </code></pre>
  
  <p>The problem with this is:       If an exception is thrown the entire command stops. Is there a better way to do this so that if a folder cannot be accessed it will just skip over it?                     </p>