Refactored FileUtils.

Removed methods that are no longer needed for Java 6, moved the remaining method into the utils directory.
This commit is contained in:
akwizgran
2015-12-10 15:58:52 +00:00
parent 947da886bf
commit 912ba394c5
19 changed files with 274 additions and 366 deletions

View File

@@ -0,0 +1,15 @@
package org.briarproject.util;
import java.io.File;
public class FileUtils {
public static void deleteFileOrDir(File f) {
if (f.isFile()) {
f.delete();
} else if (f.isDirectory()) {
for (File child : f.listFiles()) deleteFileOrDir(child);
f.delete();
}
}
}