title: System.IO.IOException thrown when trying to get file names
body: <p>I'm trying to calculate the total size of all the files in which last write time is earlier than 10 minutes from now in a specified directory <em>which has a large amount of data</em>. Here goes the code I've tried below:</p>
  
  <pre><code>DateTime from_date = DateTime.Now.AddMinutes(-10);
  List&lt;string&gt; list = Directory.GetFiles(@[PATH], "*", SearchOption.AllDirectories)               
              .Where(x =&gt; File.GetLastWriteTime(x).Date &gt; from_date)
              .Select(x =&gt; new FileInfo(x).FullName)
              .ToList();            
  
  foreach (String s in list)
  {
      FileInfo file = new FileInfo(s);
      size += file.Length;
  }
  
  button6.Text = ((size / 1024f) / 1024f) + "MB";
  </code></pre>
  
  <p>This works when I specify a <strong>local</strong> path, but throws me a <strong>Network name no longer available</strong> IOException when specifying a network path. Why does it happen? Is there a way where I can kind of "hold" the network path or make sure the connection to this path will not fail?</p>