code: public void link(JimfsPath link, FileSystemView existingView, JimfsPath existing)
        throws IOException {
      checkNotNull(link);
      checkNotNull(existingView);
      checkNotNull(existing);
  
      if (!store.supportsFeature(Feature.LINKS)) {
        throw new UnsupportedOperationException();
      }
  
      if (!isSameFileSystem(existingView)) {
        throw new FileSystemException(
            link.toString(),
            existing.toString(),
            "can't link: source and target are in different file system instances");
      }
  
      Name linkName = link.name();
  
      // existingView is in the same file system, so just one lock is needed
      store.writeLock().lock();
      try {
        // we do want to follow links when finding the existing file
        File existingFile =
            existingView.lookUp(existing, Options.FOLLOW_LINKS).requireExists(existing).file();
        if (!existingFile.isRegularFile()) {
          throw new FileSystemException(
              link.toString(), existing.toString(), "can't link: not a regular file");
        }
  
        Directory linkParent =
            lookUp(link, Options.NOFOLLOW_LINKS).requireDoesNotExist(link).directory();
  
        linkParent.link(linkName, existingFile);
        linkParent.updateModifiedTime();
      } finally {
        store.writeLock().unlock();
      }
    }
docs: Creates a hard link at the given link path to the regular file at the given path. The existing
  file must exist and must be a regular file. The given file system view must belong to the same
  file system as this view.