code: public boolean renameTo(File newPath) {
          try {
              Libcore.os.rename(path, newPath.path);
              return true;
          } catch (ErrnoException errnoException) {
              return false;
          }
      }
docs: Renames this file to {@code newPath}. This operation is supported for both
  files and directories.
  
  <p>Many failures are possible. Some of the more likely failures include:
  <ul>
  <li>Write permission is required on the directories containing both the source and
  destination paths.
  <li>Search permission is required for all parents of both paths.
  <li>Both paths be on the same mount point. On Android, applications are most likely to hit
  this restriction when attempting to copy between internal storage and an SD card.
  </ul>
  
  <p>Note that this method does <i>not</i> throw {@code IOException} on failure.
  Callers must check the return value.
  
  @param newPath the new path.
  @return true on success.