
public static boolean DeleteAllFiles(String path)
{
File tmp=new File(path);
if(tmp.exists())
{
if(tmp.isDirectory())
{
File[] arr=tmp.listFiles();
for(int i=0;i<arr.length;i++)
{
if(arr[i].isDirectory())
{
if(DeleteAllFiles(arr[i].toString())==false)return false;
}else
{
arr[i].delete();
}
}
return tmp.delete();
}else return tmp.delete();
}
return true;
}
