code: public static boolean deleteQuietly(@Nullable Path path) {
      if (path == null) {
        return false;
      }
  
      try {
        if (path.toFile().isDirectory()) {
          deleteDirectory(path);
        } else {
          Files.delete(path);
        }
        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 path file or directory to delete, can be {@code null}
  @return {@code true} if the file or directory was deleted, otherwise {@code false}