code: public String getName() {
          getUncPath0();
          if( canon.length() > 1 ) {
              int i = canon.length() - 2;
              while( canon.charAt( i ) != '/' ) {
                  i--;
              }
              return canon.substring( i + 1 );
          } else if( share != null ) {
              return share + '/';
          } else if( url.getHost().length() > 0 ) {
              return url.getHost() + '/';
          } else {
              return "smb1://";
          }
      }
docs: Returns the last component of the target URL. This will
  effectively be the name of the file or directory represented by this
  <code>SmbFile</code> or in the case of URLs that only specify a server
  or workgroup, the server or workgroup will be returned. The name of
  the root URL <code>smb1://</code> is also <code>smb1://</code>. If this
  <tt>SmbFile</tt> refers to a workgroup, server, share, or directory,
  the name will include a trailing slash '/' so that composing new
  <tt>SmbFile</tt>s will maintain the trailing slash requirement.
  
  @return  The last component of the URL associated with this SMB
  resource or <code>smb1://</code> if the resource is <code>smb1://</code>
  itself.