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;
    }