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

Nicolas Capponi
23.02.2016 ec6fcea7eb3b1013db8b26ff65327d3ab24077c9
opendj-server-legacy/src/main/java/org/opends/server/util/StaticUtils.java
@@ -1780,14 +1780,11 @@
  public static boolean deleteFiles(Iterable<File> files)
  {
    boolean allDeleted = true;
    if (files != null)
    for (File f : files)
    {
      for (File f : files)
      if (!f.isDirectory())
      {
          if (!f.isDirectory())
          {
            allDeleted = f.delete() && allDeleted;
          }
        allDeleted &= f.delete();
      }
    }
    return allDeleted;
@@ -1897,6 +1894,27 @@
  }
  /**
   * Returns the sorted list of names of provided files.
   *
   * @param files
   *            The files to sort and get the names of
   * @return the sorted list of file names
   */
  public static List<String> getFileNames(final File[] files)
  {
    final List<String> names = new ArrayList<>(files.length);
    for (final File f : files)
    {
      if (f.isFile())
      {
        names.add(f.getName());
      }
    }
    Collections.sort(names);
    return names;
  }
  /**
   * Retrieves a {@code File} object corresponding to the specified path.
   * If the given path is an absolute path, then it will be used.  If the path
   * is relative, then it will be interpreted as if it were relative to the