retro/mime.php
Michel Roux dc16fc8c49
Some checks failed
retro / xml (push) Successful in 22s
retro / php (push) Failing after 34s
retro / nodejs (push) Failing after 1m0s
retro / release (push) Has been skipped
feat: remove vue and work on init
2025-01-02 08:10:20 +01:00

26 lines
425 B
PHP

<?php
// https://github.com/EmulatorJS/EmulatorJS/blob/main/index.html
declare(strict_types=1);
require_once __DIR__.'/vendor/autoload.php';
use Symfony\Component\Mime\MimeTypes;
$mime = new MimeTypes();
foreach ($argv as $i => $arg) {
if (!$i) {
continue;
}
$types = $mime->getMimeTypes($arg);
foreach ($types as $type) {
if (preg_match('/^application\/x-.*-rom$/', $type)) {
echo $type.PHP_EOL;
}
}
}