Elgg\Filesystem\MimeTypeDetector::tryMimeContentType PHP Method

tryMimeContentType() public static method

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