code: public String getBaseName() {
          String n = getName();
          int idx = n.lastIndexOf('.');
          if (idx<0)  return n;
          return n.substring(0,idx);
      }
docs: Gets the file name portion except the extension.
  
  For example, "foo" for "foo.txt" and "foo.tar" for "foo.tar.gz".