public static File createDirectory(final String dirName){
  File tmpDir=new File(dirName);
  if (!tmpDir.mkdir() && !tmpDir.exists()) {
    throw new RuntimeException("The tmp directory " + dirName + " could not be created.");
  }
  return tmpDir;
}

public static File createDirectory ( final String dirName ) { File tmpDir = new File ( dirName ) ; if ( ! tmpDir . mkdir ( ) && ! tmpDir . exists ( ) ) { throw new RuntimeException ( "The tmp directory " + dirName + " could not be created." ) ; } return tmpDir ; }
method to create a directory . taken from outputdirectoryhierarchy . i am no expert on this so this may be wrong or incomplete .
