logger.info("Set parameter: " + parameter + " -> " + metadataDirPath);
File metadataDir = new File(metadataDirPath);
if(metadataDir.exists() && !metadataDir.isDirectory())
{
logger.error("Directory provided for " + parameter + " is actually a file!");
throw new KarmaException("Directory provided for " + parameter + " is actually a file!");
}
if(!metadataDir.exists())
{
if(!metadataDir.mkdirs())
{
logger.error("Unable to create directory for metadata: " + parameter);
throw new KarmaException("Unable to create directory for metadata! " + parameter.name());
}
}
}