title: Reporting Progress on Directory.GetFiles
body: <p>Is there a quick way to load in the fully qualified path to every file (that you have read access to) starting with a supplied root directory into say a <code>string[]</code>?</p>
  
  <p>I saw <code>System.IO.Directory.GetFiles</code>, but you have to supply a filter before you're allowed to input the <code>SearchOption.AllDirectories</code>, so I tried:</p>
  
  <pre><code>string[] directoryList = Directory.GetFiles(RootPath, "*.*",
                                              SearchOption.AllDirectories);
  </code></pre>
  
  <p>Where <code>RootPath</code> is my valid, rooted directory.  This seemed to work OK, except that it hung my windows form app up for a very long time when pointing it to a large directory/file structure of 29GB and a few hundred thousand files.</p>
  
  <p>So I thought about threading it via a <code>BackgroundWorker</code> so that my GUI didn't appear locked up, but I'm not sure how I'd report progress for something like this for a <code>ProgressBar</code> since it's just one statement that's doing the loading and I've no information on the total number of files upfront, or the number it has processed already etc.</p>