docs: private List<Path> linkTargets(Path link) throws IOException {
          link = link.toAbsolutePath();
  
          List<Path> out = new ArrayList<>();
          out.add(link);
  
          if (Files.isSymbolicLink(link.getParent())) {
              Path target = link.getParent()
                                .getParent()
                                .resolve(Files.readSymbolicLink(link.getParent()))
                                .resolve(link.getFileName())
                                .toAbsolutePath();
              out.addAll(linkTargets(target));
          } else if (Files.isSymbolicLink(link)) {
              Path target = link.getParent()
                                .resolve(Files.readSymbolicLink(link))
                                .toAbsolutePath();
              out.addAll(linkTargets(target));
          } else {
              // Then resolve the rest.
              Path canonical = readCanonicalPath(link);
              if (!canonical.equals(link)) {
                  out.add(canonical);
              }
          }
  
          return out;
      }