private File expandScriptPlugin ( final File file ) throws IOException { if ( ! cachedir . exists ( ) ) { if ( ! cachedir . mkdirs ( ) ) { log . warn ( "Unable to create cache dir: " + cachedir . getAbsolutePath ( ) ) ; } } final File jardir = getFileCacheDir ( ) ; if ( ! jardir . exists ( ) ) { if ( ! jardir . mkdir ( ) ) { log . warn ( "Unable to create cache dir for plugin: " + jardir . getAbsolutePath ( ) ) ; } } final String prefix = getFileBasename ( ) + "/contents" ; debug ( "Expand zip " + file . getAbsolutePath ( ) + " to dir: " + jardir + ", prefix: " + prefix ) ; ZipUtil . extractZip ( file . getAbsolutePath ( ) , jardir , prefix , prefix + "/" ) ; return jardir ; }
Expand zip file into plugin cache dir