code: public static boolean deleteQuietly(File file) {
      if (file == null) {
        return false;
      }
      try {
        if (file.isDirectory()) {
          cleanDirectory(file);
        }
      } catch (Exception ignored) {
      }
  
      try {
        return file.delete();
      } catch (Exception 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</code>
  @return <code>true</code> if the file or directory was deleted, otherwise
  <code>false</code>
  
  @since 1.4