feat(dump): list dumps stored in the plugin filesystem

This commit is contained in:
haylan committed 2026-09-14 22:00:26 +02:00
1 parent f982c3c3da
commit 309cdf3f09
3 files changed
+90

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
<?php declare(strict_types=1);
namespace AeonDumpManager\Struct;
/**
* A dump on disk. Not a DAL entity — dumps are plain files in the plugin's
* private Flysystem mount, identified by their filename.
*/
final class DumpFile
{
public function __construct(
public readonly string $filename,
public readonly \DateTimeImmutable $datetime,
public readonly int $sizeBytes,
) {
}
/**
* @return array{filename: string, datetime: string, sizeBytes: int}
*/
public function jsonSerialize(): array
{
return [
'filename' => $this->filename,
'datetime' => $this->datetime->format(DATE_ATOM),
'sizeBytes' => $this->sizeBytes,
];
}
}