public static boolean deleteQuietly(@Nullable File file) {
    if (file == null) {
      return false;
    }

    try {
      if (file.isDirectory()) {
        deleteDirectory(file);

        if (file.exists()) {
          LOG.warn("Unable to delete directory '{}'", file);
        }
      } else {
        Files.delete(file.toPath());
      }
      return true;
    } catch (IOException | SecurityException ignored) {
      return false;
    }
  }
@Test
  public void deleteQuietly_does_not_fail_if_argument_is_null() {
    FileUtils2.deleteQuietly(null);
  }