code: @CheckForNull
      public static String resolveSymlink(@Nonnull File link) throws IOException {
          try {
              Path path = fileToPath(link);
              return Files.readSymbolicLink(path).toString();
          } catch (UnsupportedOperationException | FileSystemException x) {
              // no symlinks on this platform (windows?),
              // or not a link (// Thrown ("Incorrect function.") on JDK 7u21 in Windows 2012 when called on a non-symlink,
              // rather than NotLinkException, contrary to documentation. Maybe only when not on NTFS?) ?
              return null;
          } catch (IOException x) {
              throw x;
          } catch (Exception x) {
              throw new IOException(x);
          }
      }
docs: Resolves symlink, if the given file is a symlink. Otherwise return null.
  <p>
  If the resolution fails, report an error.
  
  @return
  null if the given file is not a symlink.
  If the symlink is absolute, the returned string is an absolute path.
  If the symlink is relative, the returned string is that relative representation.
  The relative path is meant to be resolved from the location of the symlink.