code: private static Path toPath(@Nonnull File file) throws IOException {
          try {
              return file.toPath();
          } catch (InvalidPathException e) {
              throw new IOException(e);
          }
      }
docs: Wraps potential {@link java.nio.file.InvalidPathException} thrown by {@link File#toPath()} in an
  {@link IOException} for backward compatibility.
  
  @param file
  @return the path for that file
  @see File#toPath()