/ Published in: Java
                    
                                        
A "quick and dirty" way to delete a directory. For more cleaner implementation, see http://www.google.com/codesearch/p?hl=en#SS2by_AKaLs/src/org/apache/commons/io/FileUtils.java&q=cleanDirectory&l=972
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
if (dir.isDirectory()) {
for (int i=0; i<children.length; i++) {
if (!success) {
return false;
}
}
}
// The directory is now empty so delete it
return dir.delete();
}
Comments
 Subscribe to comments
                    Subscribe to comments
                
                