Since we appended a gzip extension to the split file name we need to take it off to get the actual split.
762957
private String splitNameWithoutGzipExtension(String split)
            throws IOException {
        if (split == null) {
            throw new IOException("Path is not a split");
        }
        if (split.endsWith(".gz")) {
            return split.substring(0, split.length() - 3);
        }
        return split;
    }
750113
def _split_iso9660_filename(fullname):
    # type: (bytes) -> Tuple[bytes, bytes, bytes]
    '''
    
    '''
    namesplit = fullname.split(b';')
    version = b''
    if len(namesplit) > 1:
        version = namesplit.pop()

    rest = b';'.join(namesplit)

    dotsplit = rest.split(b'.')
    if len(dotsplit) == 1:
        name = dotsplit[0]
        extension = b''
    else:
        name = b'.'.join(dotsplit[:-1])
        extension = dotsplit[-1]

    return (name, extension, version)
532208
function removeExtensionDir(done) {
            if (!self.dir) return done(null);

            rimraf(self.dir, done);
        }
506121
@Nonnull
  public static String extractPackageName(@Nonnull final String fileNameWithoutExtension) {
    final int lastDot = fileNameWithoutExtension.lastIndexOf('.');
    if (lastDot < 0) {
      return "";
    }
    return fileNameWithoutExtension.substring(0, lastDot).trim();
  }
407983
def extension(filename):
    ''''''
    filename = os.path.basename(filename)
    extension = None

    while '.' in filename:
        filename, ext = os.path.splitext(filename)
        if ext.startswith('.'):
            ext = ext[1:]
        extension = ext if not extension else ext + '.' + extension

    return extension
1337742
public static boolean isFileInZip(String name) {
		if (name == null) {
			return false;
		}

		for (String element : ZIP_EXTENSIONS) {
			if (name.toLowerCase().contains(element + ZIP_DELIMITER)) {
				return true;
			}
		}
		return false;
	}
394532
public static String getExtension(String fileName) {
    int pos = fileName.lastIndexOf('.');
    if (pos < 0) {
      return "";
    }
    return fileName.substring(pos + 1);
  }
391094
def split_ext(path, basename=True):
    """"""
    if basename:
        path = os.path.basename(path)
    return os.path.splitext(path)
59383
def file_extension(path):
    
    if path is None:
        return None
    ext = os.path.splitext(os.path.basename(path))[1]
    if ext.startswith("."):
        ext = ext[1:]
    return ext
867994
def splitext_no_dot(filename):
    
    name, ext = os.path.splitext(filename)
    ext = ext.lower()
    return name, ext.strip('.')
20923
function mustUnzip(file, mode){
  if (mode){
    return mode === 'tgz';
  }
  var extension = path.extname(file);
  return contains(['.tgz', '.gz'], extension);
}
1374741
def check_filename(filename)
      extension = filename.split('.').last
      return true if valid_extensions.include?(extension)
      false
    end
1073318
def _add_suffix(file_path, suffix, sep='_', ext=None):
    """"""
    # Split file_path on last '.' to separate file_name and file_extension
    split = os.path.basename(file_path).rsplit('.', 1)

    # Use original file_extension if None is given
    ext = split[1] if not ext else ext.strip('.')

    # Rebuild new file_path with suffix
    return os.path.join(os.path.dirname(file_path), split[0] + sep + suffix + '.' + ext)
1201819
function _split(source) {
  var buf = [];
  var reg = /'[^']+'|"[^"]+"|[^\s/=]+=?/g;
  reg.lastIndex = 0;
  var match = reg.exec(source);

  while (match) {
    buf.push(match);
    match = reg.exec(source);
  }

  return buf;
}
459007
public static String removeExtension(String fileName) {
		final String separator = FILE_SEPARATOR;
		String filename;
		// Remove the path upto the filename.
		final int lastSeparatorIndex = fileName.lastIndexOf(separator);
		if (lastSeparatorIndex == -1) {
			filename = fileName;
		} else {
			filename = fileName.substring(lastSeparatorIndex + 1);
		}

		// Remove the extension.
		final int extensionIndex = filename.lastIndexOf(".");
		if (extensionIndex == -1) {
			return filename;
		}
		fileName = fileName.substring(0, lastSeparatorIndex);
		return fileName + File.separator + filename.substring(0, extensionIndex);
	}
1184679
function (filename, ext) {
  if (!_.isString(filename) || !_.isString(ext)) {
    return false;
  }
  ext = ext.slice(0, 1) === '.' ? ext : ('.' + ext);
  return !!(filename && filename.split(ext).pop() === '');
}
168214
def file_extension(filename)
      ext = File.extname(filename).gsub('.','').downcase if filename
      # for remote files which has asset id after extension
      ext.split('?')[0]
    end