Elgg\Filesystem\MimeTypeDetector::tryMimeContentType PHP Méthode

tryMimeContentType() public static méthode

Detect MIME type using mime_content_type
public static tryMimeContentType ( string $file ) : string
$file string File path
Résultat string Type detected. Empty string on failure
    public static function tryMimeContentType($file)
    {
        return function_exists('mime_content_type') ? mime_content_type($file) : '';
    }