title: Access to the path is denied when using Directory.GetFiles(...)
body: <p>I'm running the code below and getting exception below. Am I forced to put this function in try catch or is there other way to get all directories recursively?
  I could write my own recursive function to get files and directory. But I wonder if there is a better way.</p>
  
  <pre><code>// get all files in folder and sub-folders
  var d = Directory.GetFiles(@"C:\", "*", SearchOption.AllDirectories);
  
  // get all sub-directories
  var dirs = Directory.GetDirectories(@"C:\", "*", SearchOption.AllDirectories);
  </code></pre>
  
  <p>"Access to the path 'C:\Documents and Settings\' is denied."</p>