org.sonar.api.utils
Class ZipUtils

java.lang.Object
  extended by org.sonar.api.utils.ZipUtils

public final class ZipUtils
extends Object

Since:
1.10

Nested Class Summary
static interface ZipUtils.ZipEntryFilter
           
 
Method Summary
static File unzip(File zip, File toDir)
          Unzip a file into a directory.
static File unzip(File zip, File toDir, ZipUtils.ZipEntryFilter filter)
           
static void zipDir(File dir, File zip)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

unzip

public static File unzip(File zip,
                         File toDir)
                  throws IOException
Unzip a file into a directory. The directory is created if it does not exist.

Returns:
the target directory
Throws:
IOException

unzip

public static File unzip(File zip,
                         File toDir,
                         ZipUtils.ZipEntryFilter filter)
                  throws IOException
Throws:
IOException

zipDir

public static void zipDir(File dir,
                          File zip)
                   throws IOException
Throws:
IOException


Copyright © 2009–2015 SonarSource. All rights reserved.