mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Nicolas Capponi
10.59.2016 3e85d5e13c0bb39af690966f4a28b8ff36f0c556
opendj-server-legacy/src/main/java/org/opends/server/util/StaticUtils.java
@@ -1768,6 +1768,29 @@
    return false;
  }
  /**
   * Deletes all provided files.
   * <p>
   * Does not handle directories.
   *
   * @param files
   *            The files to delete.
   * @return {@code true} if deletion is successful for all files, false otherwise
   */
  public static boolean deleteFiles(Iterable<File> files)
  {
    boolean allDeleted = true;
    if (files != null)
    {
      for (File f : files)
      {
          if (!f.isDirectory())
            allDeleted = f.delete() && allDeleted;
          }
      }
    return allDeleted;
  }
  /**