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

kenneth_suter
09.24.2007 1387e05a497147cd1a320c9651a47f122e942b93
opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
@@ -135,6 +135,25 @@
  }
  /**
   * Creates a new file attempting to create the parent directories
   * if necessary.
   * @param f File to create
   * @return boolean indicating whether the file was created; false otherwise
   * @throws IOException if something goes wrong
   */
  public static boolean createFile(File f) throws IOException {
    boolean success = false;
    if (f != null) {
      File parent = f.getParentFile();
      if (!parent.exists()) {
        parent.mkdirs();
      }
      success = f.createNewFile();
    }
    return success;
  }
  /**
   * Returns the absolute path for the given parentPath and relativePath.
   * @param parentPath the parent path.
   * @param relativePath the relative path.