code: @Override
  	public String getLabel() {
  		ResourceStore rs;
  		ResourceRef rr;
  		synchronized(lock) {
  			rs = this.resourceStore;
  			rr = this.resourceRef;
  		}
  		if(rr != null) {
  			String path = rr.getPath().toString();
  			boolean isDirectory = path.endsWith(Path.SEPARATOR_STRING);
  			int slashBefore;
  			if(isDirectory) {
  				slashBefore = path.lastIndexOf(Path.SEPARATOR_CHAR, path.length() - 2);
  			} else {
  				slashBefore = path.lastIndexOf(Path.SEPARATOR_CHAR);
  			}
  			String filename = path.substring(slashBefore + 1);
  			if(filename.isEmpty()) throw new IllegalArgumentException("Invalid filename for file: " + path);
  			if(!isDirectory) {
  				if(rs != null) {
  					try {
  						try (ResourceConnection conn = rs.getResource(rr.getPath()).open()) {
  							if(conn.exists()) {
  								return
  									filename
  									+ " ("
  									+ StringUtility.getApproximateSize(conn.getLength())
  									+ ')'
  								;
  							}
  						}
  					} catch(FileNotFoundException e) {
  						// Resource removed between calls to exists() and getLength()
  						// fall-through to return filename
  					} catch(IOException e) {
  						throw new WrappedException(e);
  					}
  				}
  			}
  			return filename;
  		}
  		throw new IllegalStateException("Path not set");
  	}
docs: The label is always the filename.