public static void rmFilesAndFolders(String path)
{
File f = new File(path);
if (f.exists())
{
if (f.isFile())
f.delete();
else
{
String[] childrens = f.list();
for (String item : childrens)
{
rmFilesAndFolders(path + "/" + item);
}
f.delete();
}
}
}