private static void createParentFile ( final File file ) throws ExtractionException { final File parent = file . getParentFile ( ) ; if ( ! parent . isDirectory ( ) && ! parent . mkdirs ( ) ) { final String msg = String . format ( "Unable to build directory '%s'." , parent . getAbsolutePath ( ) ) ; throw new ExtractionException ( msg ) ; } }
Ensures the parent path is correctly created on disk so that the file can be extracted to the correct location .