public static function guess(string $guess): ?string
    {
        if (! \is_file($guess)) {
            throw new FileNotFoundException($guess);
        }

        if (! \is_readable($guess)) {
            throw new AccessDeniedException($guess);
        }

        return parent::guess(\pathinfo($guess, \PATHINFO_EXTENSION));
    }
public static function guess(string $guess): ?string
    {
        if (! \is_file($guess)) {
            throw new FileNotFoundException($guess);
        }

        if (! \is_readable($guess)) {
            throw new AccessDeniedException($guess);
        }

        return parent::guess(\pathinfo($guess, \PATHINFO_EXTENSION));
    }
public static function guess ( string $ guess ) : ? string { if ( ! \ is_file ( $ guess ) ) { throw new FileNotFoundException ( $ guess ) ; } if ( ! \ is_readable ( $ guess ) ) { throw new AccessDeniedException ( $ guess ) ; } return parent :: guess ( \ pathinfo ( $ guess , \ PATHINFO_EXTENSION ) ) ; }
Guesses the mime type using the file extension.

@param string $guess The path to the file

@throws \Narrowspark\MimeType\Exception\FileNotFoundException If the file does not exist
@throws \Narrowspark\MimeType\Exception\AccessDeniedException If the file could not be read

@return null|string
Guesses the mime type using the file extension .