code: public static boolean deleteQuietly(@Nullable File file) {
      if (file == null) {
        return false;
      }
  
      try {
        if (file.isDirectory()) {
          deleteDirectory(file);
        } else {
          Files.delete(file.toPath());
        }
        return true;
      } catch (IOException | SecurityException ignored) {
        return false;
      }
    }
docs: Deletes a file, never throwing an exception. If file is a directory, delete it and all sub-directories.
  <p>
  The difference between File.delete() and this method are:
  <ul>
  <li>A directory to be deleted does not have to be empty.</li>
  <li>No exceptions are thrown when a file or directory cannot be deleted.</li>
  </ul>
  
  @param file  file or directory to delete, can be {@code null}
  @return {@code true} if the file or directory was deleted, otherwise {@code false}