1 21 22 package org.continuent.sequoia.common.util; 23 24 import java.io.File ; 25 26 33 public class FileManagement 34 { 35 36 42 public static final boolean deleteDir(File dir) 43 { 44 if (dir.isDirectory()) 45 { 46 String [] children = dir.list(); 47 for (int i = 0; i < children.length; i++) 48 { 49 boolean success = deleteDir(new File (dir, children[i])); 50 if (!success) 51 { 52 return false; 53 } 54 } 55 } 56 return dir.delete(); 58 } 59 60 } 61 | Popular Tags |