Debug: cache quota

This commit is contained in:
M66B
2022-05-01 07:52:49 +02:00
parent 4f38136696
commit a4cd879026
5 changed files with 37 additions and 16 deletions

View File

@@ -2029,16 +2029,16 @@ public class Helper {
} catch (IOException ex) {
Log.w(ex);
}
return -1;
return 0;
}
static long getSize(File dir) {
static long getSizeUsed(File dir) {
long size = 0;
File[] listed = dir.listFiles();
if (listed != null)
for (File file : listed)
if (file.isDirectory())
size += getSize(file);
size += getSizeUsed(file);
else
size += file.length();
return size;