private void checkDirExistence(String outFileName){
  File outFile=new File(outFileName);
  File outDir=outFile.getParentFile();
  if (outDir != null && !outDir.exists()) {
    if (!createDirs(outDir)) {
      throw new SimError("Couldn't create report directory '" + outDir.getAbsolutePath() + "'");
    }
  }
}

private void checkDirExistence ( String outFileName ) { File outFile = new File ( outFileName ) ; File outDir = outFile . getParentFile ( ) ; if ( outDir != null && ! outDir . exists ( ) ) { if ( ! createDirs ( outDir ) ) { throw new SimError ( "Couldn't create report directory '" + outDir . getAbsolutePath ( ) + "'" ) ; } } }
checks that a directory for a file exists or creates the directory if it didn ' t exist .
