public static function getMimetype(string $file): string
    {
        $finfo = finfo_open(FILEINFO_MIME_TYPE); // return mime type ala mimetype extension
        $mimetype = finfo_file($finfo, $file);
        finfo_close($finfo);
        
        return $mimetype;
    }
public static function getMimetype(string $file): string
    {
        $finfo = finfo_open(FILEINFO_MIME_TYPE); // return mime type ala mimetype extension
        $mimetype = finfo_file($finfo, $file);
        finfo_close($finfo);
        
        return $mimetype;
    }
public static function getMimetype ( string $ file ) : string { $ finfo = finfo_open ( FILEINFO_MIME_TYPE ) ; // return mime type ala mimetype extension $ mimetype = finfo_file ( $ finfo , $ file ) ; finfo_close ( $ finfo ) ; return $ mimetype ; }
Get the mimetype of the file at the specified path.

@param string $file
Path of the file to get the mimetype of.

@return string Mimetype of file at the specified path.
Get the mimetype of the file at the specified path .