private void initOutputDir ( File outputDir ) { if ( ! outputDir . exists ( ) ) { if ( ! outputDir . mkdirs ( ) ) { throw new IllegalArgumentException ( "Output Directory " + outputDir + " could not be created" ) ; } } if ( ! outputDir . isDirectory ( ) || ( ! outputDir . canWrite ( ) ) ) { throw new IllegalArgumentException ( "Output Directory " + outputDir + " is not a directory or cannot be written to." ) ; } }
Set up and validate the creation of the specified output directory