title: Does DirectoryInfo.EnumerateDirectories sort items?
body: <p>I have an application that has to enumerate a few folders and process the files inside them.</p>
  
  <p>It has to support resuming, meaning it has to start from the folder it was processing the last time.</p>
  
  <p>I was thinking of using <a href="http://msdn.microsoft.com/en-us/library/dd413235.aspx" rel="nofollow">the <code>DirectoryInfo.EnumerateDirectories</code> method</a>. I'd save the name of the last processed dir in a file, skip the enumeration until I meet that dir name and continue processing from there.</p>
  
  <p>However, the documentation does not say anything about the order in which files are enumerated.</p>
  
  <p>Is it safe to assume that using this method the program will always process the remaining directories? Or is it possible that the next time the program runs the directories will be enumerated in another order, thus making it possible to leave some unprocessed and process others two times?</p>
  
  <p>If this method is not safe, what would be a good alternative?</p>