public static function isBinary($path)
    {
        self::fullpath($path);

        $size = filesize($path);

        if ($size >= 0 && $size < 2) {
            return false;
        }

        $finfo  = finfo_open(FILEINFO_MIME_ENCODING);
        $encode = finfo_buffer($finfo, file_get_contents($path, false, null, 0, 5012));
        finfo_close($finfo);

        return strcasecmp($encode, 'binary') === 0;
    }
public static function isBinary($path)
    {
        self::fullpath($path);

        $size = filesize($path);

        if ($size >= 0 && $size < 2) {
            return false;
        }

        $finfo  = finfo_open(FILEINFO_MIME_ENCODING);
        $encode = finfo_buffer($finfo, file_get_contents($path, false, null, 0, 5012));
        finfo_close($finfo);

        return strcasecmp($encode, 'binary') === 0;
    }
public static function isBinary ( $ path ) { self :: fullpath ( $ path ) ; $ size = filesize ( $ path ) ; if ( $ size >= 0 && $ size < 2 ) { return false ; } $ finfo = finfo_open ( FILEINFO_MIME_ENCODING ) ; $ encode = finfo_buffer ( $ finfo , file_get_contents ( $ path , false , null , 0 , 5012 ) ) ; finfo_close ( $ finfo ) ; return strcasecmp ( $ encode , 'binary' ) === 0 ; }
Determines whether the file is binary

@param string $path
@throws \Inphinit\Experimental\Exception
@return bool
Determines whether the file is binary