code: public int getType() throws SmbException {
          if( type == 0 ) {
              if( getUncPath0().length() > 1 ) {
                  type = TYPE_FILESYSTEM;
              } else if( share != null ) {
                  // treeConnect good enough to test service type
                  connect0();
                  if( share.equals( "IPC$" )) {
                      type = TYPE_NAMED_PIPE;
                  } else if( tree.service.equals( "LPT1:" )) {
                      type = TYPE_PRINTER;
                  } else if( tree.service.equals( "COMM" )) {
                      type = TYPE_COMM;
                  } else {
                      type = TYPE_SHARE;
                  }
              } else if( url.getAuthority() == null || url.getAuthority().length() == 0 ) {
                  type = TYPE_WORKGROUP;
              } else {
                  UniAddress addr;
                  try {
                      addr = getAddress();
                  } catch( UnknownHostException uhe ) {
                      throw new SmbException( url.toString(), uhe );
                  }
                  if( addr.getAddress() instanceof NbtAddress ) {
                      int code = ((NbtAddress)addr.getAddress()).getNameType();
                      if( code == 0x1d || code == 0x1b ) {
                          type = TYPE_WORKGROUP;
                          return type;
                      }
                  }
                  type = TYPE_SERVER;
              }
          }
          return type;
      }
docs: Returns type of of object this <tt>SmbFile</tt> represents.
  @return <tt>TYPE_FILESYSTEM, TYPE_WORKGROUP, TYPE_SERVER, TYPE_SHARE,
  TYPE_PRINTER, TYPE_NAMED_PIPE</tt>, or <tt>TYPE_COMM</tt>.