Add used_space

This commit is contained in:
2025-07-08 17:41:57 +02:00
parent 918ca9cb2c
commit c3b8874f3c

View File

@@ -159,7 +159,8 @@ foreach ($clients as $c) {
}
header('Content-Type: application/json; charset=UTF-8');
echo "{\"data\": [\n";
$size = intval(exec("du -s .data/$c")) * 1024;
echo "{\"used_space\": $size, \"data\": [\n";
$first = true;
foreach (scandir(".data/$c/") as $file) {
if (str_starts_with($file, ".") || str_ends_with($file, ".php") || str_ends_with($file, ".inc")) continue;