Add an option to change cache size and clear the cache
This commit is contained in:
@@ -158,5 +158,18 @@ public final class DiskUtils {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static long getDirectorySize(File f) {
|
||||
long size = 0;
|
||||
if (f.isDirectory()) {
|
||||
for (File file : f.listFiles()) {
|
||||
size += getDirectorySize(file);
|
||||
}
|
||||
} else {
|
||||
size=f.length();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user