private static void createDirectory ( Path path ) throws IOException { try { Files . createDirectory ( path ) ; } catch ( FileAlreadyExistsException e ) { if ( ! Files . isDirectory ( path ) ) { throw e ; } } }
Create a directory at the given path if it does not exist yet .