<?php finfo_file( finfo $finfo, string $filename, int $flags = FILEINFO_NONE, ?resource $context = null): string|false
<?php $this->filename = array_key_exists('filename', $info) ? $info['filename'] : null; if (file_exists($path) && is_file($path)) { $this->mime = finfo_file(finfo_open(FILEINFO_MIME_TYPE), $path); } return $this;
<?php } $mime = finfo_file(finfo_open(FILEINFO_MIME_TYPE), $path); switch (strtolower($mime)) {