feat: runtime.loadJar() cache dex

This commit is contained in:
hyb1996
2018-10-10 00:31:55 +08:00
parent 94395544b7
commit 6cebca179c
8 changed files with 90 additions and 19 deletions

View File

@@ -395,6 +395,19 @@ public class PFiles {
return file.delete();
}
public static boolean deleteFilesOfDir(File dir) {
if (!dir.isDirectory())
throw new IllegalArgumentException("not a directory: " + dir);
File[] children = dir.listFiles();
if (children != null) {
for (File child : children) {
if (!deleteRecursively(child))
return false;
}
}
return true;
}
public static boolean remove(String path) {
return new File(path).delete();
}