title: Easy Way to Recursively Delete Directories in IsolatedStorage on WP7 & 8
body: <p>In IsolatedStorage you have to delete all the folders and files inside a directory before you can delete the directory itself in IsolatedStorage.</p>
  
  <p>Normally If I'm deleting a directory in IsolatedStorage which has some files inside I would get the list of directories, then use a <code>foreach</code> statement and check if each of those has files then use another <code>foreach</code> statement to delete each of the files inside those directories.</p>
  
  <p>However I have a much more complicated FileSystem going on in <code>IsolatedStorage</code> which looks a bit like this:</p>
  
  <p><code>Several Main directories</code> which contain <code>Several sub-directories</code> these <code>sub-directories</code>
  contain another <code>1-100 additional sub-directories</code> which contain about <code>3-5 files</code></p>
  
  <p>At the moment the only technique I know of (using <code>foreach</code> statements and many <code>IsolatedStorageFile.GetUserStoreForApplication().GetDirectoryNames()</code>) is hardly what you would call efficient.</p>
  
  <p>Is there an easier/easy way of checking for recursively deleting directories and their files?</p>