<?php scandir(string $directory, int $sorting_order = SCANDIR_SORT_ASCENDING, ?resource $context = null): array|false
<?php $deleteDirectory = function (string $path) use (&$deleteDirectory): void { if (file_exists($path)) { $scannedDir = scandir($path); assert(is_array($scannedDir)); $files = array_diff($scannedDir, ['.', '..']);