Determine if the suffix is `.zip` format
544710
def __isValidZIP(self, suffix):
        """"""
        if suffix and isinstance(suffix, string_types):
            if suffix.endswith(".zip"):
                return True
        return False
1005885
def _info_name(info):
    

    if isinstance(info, zipfile.ZipInfo):
        return info.filename.replace('\\', '/')
    return info.name.replace('\\', '/')
349599
def archive_basename(filename):
    ''''''
    for archive in archive_formats:
        if filename.endswith(archive_formats[archive]['suffix']):
            return filename.rstrip('.' + archive_formats[archive]['suffix'])
    return False
1250218
def __ensure_suffix_stem(t, suffix):
    
    tpath = str(t)
    if not tpath.endswith(suffix):
        stem = tpath
        tpath += suffix
        
        return tpath, stem
    else:
        stem, ext = os.path.splitext(tpath)
    
    return t, stem
681783
def is_gzip_file(abspath):
    
    abspath = abspath.lower()
    _, ext = os.path.splitext(abspath)
    if ext in [".gz", ".zip"]:
        is_gzip = True
    else:
        is_gzip = False
    return is_gzip
1081854
def __getFilenameSuffix(self, filename):
        """"""
        if filename and isinstance(filename, string_types):
            if self.__isValidTGZ(filename):
                return ".tar.gz"
            elif filename.endswith(".zip"):
                return ".zip"
819436
public static boolean isZip(String fName)
  {
    if (Strings.isNullOrEmpty(fName)) {
      return false;
    }
    return fName.endsWith(ZIP_SUFFIX); // Technically a file named `.zip` would be fine
  }
1040521
public static boolean isZip(String fileName) {
		if (fileName == null) {
			return false;
		}

		String tl = fileName.toLowerCase();
		for (String element : ZIP_EXTENSIONS) {
			if (tl.endsWith(element)) {
				return true;
			}
		}
		return false;
	}
1269139
def suffix(filename,suffix):
    '''  '''
    return os.path.split(re.sub(_afni_suffix_regex,"%s\g<1>" % suffix,str(filename)))[1]
167019
def has_suffix(path_name, suffix):
    
    if isinstance(suffix, str):
        suffix = disintegrate(suffix)

    components = disintegrate(path_name)

    for i in range(-1, -(len(suffix) + 1), -1):
        if components[i] != suffix[i]:
            break
    else:
        return True
    return False
1196030
def getFileName(self, suffix=None, extension="jar"):
        

        assert (self._artifactId is not None)
        assert (self._version is not None)

        return "{0}-{1}{2}{3}".format(
            self._artifactId,
            self._version.getRawString(),
            "-" + suffix.lstrip("-") if suffix is not None else "",
            "." + extension.lstrip(".") if extension is not None else ""
        )
383880
def is_compressed(path):
        
        if path.endswith(".zip"):
            return "zip"
        elif path.endswith(".tar.gz"):
            return "tar.gz"
        elif path.endswith(".tar.bz2"):
            return "tar.bz2"
        elif path.endswith(".gz"):
            return "gz"
        elif path.endswith(".bz2"):
            return "bz2"
        elif path.endswith(".tar"):
            return "tar"
        return ""
280453
def fix_filename(filename, suffix=''):
    
    if suffix:
        f, ext = os.path.splitext(filename)
        return f+suffix+ext
    else:
        return filename
497006
function checkZipFile(zipFilePath, cb) {
  //Checking that it is a ZIP file
  mimeInspector.detectFile(zipFilePath, function(err, fileMimetype) {
    var errMessage;
    if (err) {
      logger.error("Error detecting ZIP file", err);
      return cb(err);
    }

    if (fileMimetype !== 'application/zip') {
      errMessage = "Expected the file MIME type to be application/zip but was " + fileMimetype;
      logger.error(errMessage);
    }

    return cb(errMessage);
  });
}
1027018
def _suffix(self):
        """"""
        _output_formats={'GCG':'.msf',
                        'GDE':'.gde',
                        'PHYLIP':'.phy',
                        'PIR':'.pir',
                        'NEXUS':'.nxs'}

        if self.Parameters['-output'].isOn():
            return _output_formats[self.Parameters['-output'].Value]
        else:
            return '.aln'
238429
def _is_suffix(self, t):
        """"""
        return t not in NOT_SUFFIX and (t.replace('.', '') in SUFFIXES or t.replace('.', '') in SUFFIXES_LOWER)
1127900
def is_archive_file(name):
    # type: (str) -> bool
    """"""
    ext = splitext(name)[1].lower()
    if ext in ARCHIVE_EXTENSIONS:
        return True
    return False