question: static void createDirectory ( final String directory ) throws IOException { File dir = new File ( directory ) ; if ( ! dir . exists ( ) ) { if ( ! dir . mkdirs ( ) ) { throw new IOException ( "Failed to create directory: " + directory ) ; } } }
target:  Creates a directory unless it already exists.