mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 04:18:53 +01:00
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:
15
briar-core/src/org/briarproject/util/FileUtils.java
Normal file
15
briar-core/src/org/briarproject/util/FileUtils.java
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user