<?php
header('Content-Type: application/json');
$dir = __DIR__;
$files = glob($dir.'/queue_*.json') ?: [];
$out = [];
foreach ($files as $f) {
  $out[] = ['file'=>basename($f),'mtime'=>@filemtime($f),'size'=>@filesize($f)];
}
echo json_encode(['dir'=>$dir,'files'=>$out]);
