DimDoors/StevenDimDoors/mod_pocketDim/helpers/DeleteFolder.java
2013-06-24 01:40:56 -04:00

32 lines
No EOL
438 B
Java

package StevenDimDoors.mod_pocketDim.helpers;
import java.io.File;
public class DeleteFolder
{
public static boolean deleteFolder(File file)
{
try
{
File[] files = file.listFiles();
if(files==null)
{
file.delete();
return true;
}
for(File inFile : files)
{
DeleteFolder.deleteFolder(inFile);
}
}
catch (Exception e)
{
e.printStackTrace();
return false;
}
return true;
}
}