Gets the file name portion except the extension.

For example, "foo" for "foo.txt" and "foo.tar" for "foo.tar.gz".
340133
public String getBaseName() {
        String n = getName();
        int idx = n.lastIndexOf('.');
        if (idx<0)  return n;
        return n.substring(0,idx);
    }
964258
def _get_filename(self):
        """"""
        if self._fname is None:
            timestamp = datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
            fname = "%s-%s.log" % (timestamp, abs(id(self)))
            self._fname = os.path.join(self.file_path, fname)
        return self._fname
1257067
function getExtensionlessFilename( filename ) {
	return filename.substr( 0, filename.length - path.extname( filename ).length);
}
79451
def filename_from_url(url):
    """"""
    fname = os.path.basename(urlparse.urlparse(url).path)
    if len(fname.strip(" \n\t.")) == 0:
        return None
    return fname
1341501
private static final String getFileName(String path) {
        int index = path.lastIndexOf('/');//stop using File.separatorChar as we are not even remotely close to be using that ANYwhere else - apparently. This makes it fail on Windows systems
        int prefixLength = prefixLength(path);
        if (index < prefixLength) return path.substring(prefixLength);
        return path.substring(index + 1);
    }
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();
  }
1288268
def strip_vl_extension(filename):
    """"""
    for ext in ['.vl.json', '.json']:
        if filename.endswith(ext):
            return filename[:-len(ext)]
    else:
        return filename
1282895
def full_filename(for_file)
      parent_name = super(for_file)
      extension = File.extname(parent_name)
      base_name = parent_name.chomp(extension)
      base_name = base_name[version_name.size.succ..-1] if version_name
      [base_name, version_name].compact.join('-') + extension
    end
24443
def get_filename(self):
        '''  '''
        if self.filename is None or not os.path.exists(self.filename):
            tf = tempfile.mktemp() + self._default_file_extension
            self.save(tf)
            yield tf
            os.remove(tf)
        else:
            yield self.filename
39376
protected String getFileName(String fileName) {
        int index = fileName.lastIndexOf('.');
        return (index == -1) ? fileName : fileName.substring(0, index);
    }
854488
private static String getFileName(String[] args)
	{
		String fileName = null;
		for (int i=0; i<args.length; i++)
		{
			if (!args[i].startsWith("-"))
			{
				fileName = args[i];
				break;
			}
		}
		return fileName;
	}
273227
protected static String getFileType(String name) {
        // TODO: Handle things like tar.gz ??
        String[] tokens = name.split("\\.(?=[^\\.]+$)");
        if (tokens.length > 1) {
            return "." + tokens[tokens.length - 1].toLowerCase();
        }
        return "";
    }
1274472
private String getFileName(String possiblyPathName) {
        possiblyPathName = possiblyPathName.substring(possiblyPathName.lastIndexOf('/')+1);
        possiblyPathName = possiblyPathName.substring(possiblyPathName.lastIndexOf('\\')+1);
        return possiblyPathName;
    }
246763
def _get_suffix(path):
    
    suffix = os.path.basename(path).split(".")[-1]

    if "/" in suffix:
        raise UserWarning("Filename can't contain '/' in suffix (%s)!" % path)

    return suffix
816050
function _getOutputFileName(path, extension) {
        var filename = path.split('/');
        filename = filename[filename.length - 1];
        filename = filename.split('.');
    
        // No extension found
        if (filename.length === 1) {
          return filename[0] + '.' + extension;
        }
    
        // Hidden file
        if (filename[0] === '') {
          filename = filename.slice(1);
          filename[0] = '.' + filename[0];
          if (filename.length === 1) {
            return filename[0] + '.' + extension;
          }
        }
    
        filename = filename.slice(0, -1);
        
        return filename + '.' + extension;
      }
934402
def getFilename(name):
    """"""
    # first replace all illegal chars
    name = re.sub(r"[^0-9a-zA-Z_\-\.]", "_", name)
    # then remove double dots and underscores
    while ".." in name:
        name = name.replace('..', '.')
    while "__" in name:
        name = name.replace('__', '_')
    # remove a leading dot or minus
    if name.startswith((".", "-")):
        name = name[1:]
    return name
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 ""
        )