public void writePopulationAndAttributes(String inputFolder,String provinceName) throws IOException {
  String path=inputFolder.endsWith("/") ? "" : "/";
  File outputFolder=new File(inputFolder + path + provinceName+ path);
  if (outputFolder.exists()) {
    throw new IOException("The output folder already exists and will not be overwritten. First delete " + outputFolder.getAbsolutePath());
  }
 else {
    outputFolder.mkdirs();
  }
  writeHouseholds(outputFolder.getAbsolutePath());
  writePopulation(outputFolder.getAbsolutePath());
}

public void writePopulationAndAttributes ( String inputFolder , String provinceName ) throws IOException { String path = inputFolder . endsWith ( "/" ) ? "" : "/" ; File outputFolder = new File ( inputFolder + path + provinceName + path ) ; if ( outputFolder . exists ( ) ) { throw new IOException ( "The output folder already exists and will not be overwritten. First delete " + outputFolder . getAbsolutePath ( ) ) ; } else { outputFolder . mkdirs ( ) ; } writeHouseholds ( outputFolder . getAbsolutePath ( ) ) ; writePopulation ( outputFolder . getAbsolutePath ( ) ) ; }
class to handle the checking and creation of the output folder . it is assumed that a province - specific folder will be created in the input folder .
