question: protected File ensureDirectoryExists ( final Logger defaultLog , final Logger shopLog , final File shopDir , final Shop shop , final String dirname ) throws IOException { final File dir = new File ( shopDir , dirname ) ; if ( ! dir . exists ( ) ) { defaultLog . info ( "Proactively creating '{}' sub directory for shop {}" , dir . getAbsolutePath ( ) , shop . getCode ( ) ) ; shopLog . info ( "Proactively creating '{}' sub directory for shop {}" , dir . getAbsolutePath ( ) , shop . getCode ( ) ) ; if ( ! dir . mkdirs ( ) ) { throw new IOException ( "Failed to create '" + dir . getAbsolutePath ( ) + "' sub directory for shop " + shop . getCode ( ) ) ; } } return dir ; }
target:  Ensure that directory exists, so that we can scan it.