code: public static boolean renameTo(final Path self, URI newPathName) {
          try {
              Files.move(self, Paths.get(newPathName));
              return true;
          } catch (IOException e) {
              return false;
          }
      }
docs: Renames a file.
  
  @param self        a Path
  @param newPathName The new target path specified as a URI object
  @return <code>true</code> if and only if the renaming succeeded;
  <code>false</code> otherwise
  @since 2.3.0