Made deleteInDirectory use deleteInDirectoryApartFrom.

This commit is contained in:
Winston Li 2014-11-17 13:09:27 +00:00
parent 555f4e1674
commit eb8dccc151

View file

@ -33,12 +33,7 @@ public class WLFileStore {
} }
public static void deleteInDirectory(File directory) { public static void deleteInDirectory(File directory) {
for (File file : directory.listFiles()) { deleteInDirectoryApartFrom(directory);
if (file.isDirectory()) {
deleteInDirectory(file);
}
file.delete();
}
} }
public static void deleteInDirectoryApartFrom(File directory, String... apartFrom) { public static void deleteInDirectoryApartFrom(File directory, String... apartFrom) {