Android Delete Directory Not Working
<p>I am trying o delete an entire directory. I have searched and I am using <a href="http://stackoverflow.com/questions/5701586/delete-a-folder-on-sd-card">this</a> code and I am able to delete everything in the directory, but the directory still remains. Here is the exact code I have just in case I am missing something.</p>

<pre><code>public boolean DeletePoint(String JobName, String PointName){
    //Delete actual contents and file
    File folder = new File(rootSaveFolder "/" + PointName+"/");
    boolean returnBool = false; 
    try{
        returnBool = deleteDirectory(folder);
        folder.delete();
    } catch (SecurityException e){
        e.printStackTrace();
    }   
}

static public boolean deleteDirectory(File path) {
    if( path.exists() ) {
      File[] files = path.listFiles();
      if (files == null) {
          return true;
      }
      for(int i=0; i&lt;files.length; i++) {
         if(files[i].isDirectory()) {
           deleteDirectory(files[i]);
         }
         else {
           files[i].delete();
         }
      }
    }
    return(path.delete());
  } 
</code></pre>

<p>The string for the file I am deleting is: /mnt/sdcard/test/gg/</p>

<p>I have tried it with out the final '/' and that didn't work either.</p>
