private File createConfigDirIfNecessary(File clusterConfigDir, String configName)
      throws IOException {
    if (!clusterConfigDir.exists() && !clusterConfigDir.mkdirs()) {
      throw new IOException("Cannot create directory : " + configDirPath);
    }
    Path configDirPath = clusterConfigDir.toPath().resolve(configName);

    File configDir = configDirPath.toFile();
    if (!configDir.exists() && !configDir.mkdir()) {
      throw new IOException("Cannot create directory : " + configDirPath);
    }

    return configDir;
  }
Creates a directory for this configuration if it doesn't already exist.
geode-core/src/main/java/org/apache/geode/distributed/internal/InternalConfigurationPersistenceService.java