docs: public static void rename(File source, File target) throws RenameException {
      Preconditions.checkNotNull(source);
      Preconditions.checkNotNull(target);
  
      // delete the target first - but ignore the result
      target.delete();
  
      if (source.renameTo(target)) {
        return;
      }
  
      Throwable innerException = null;
      if (target.exists()) {
        innerException = new FileDeleteException(target.getAbsolutePath());
      } else if (!source.getParentFile().exists()) {
        innerException = new ParentDirNotFoundException(source.getAbsolutePath());
      } else if (!source.exists()) {
        innerException = new FileNotFoundException(source.getAbsolutePath());
      }
  
      throw new RenameException(
          "Unknown error renaming " + source.getAbsolutePath() + " to " + target.getAbsolutePath(),
          innerException);
    }