Package org.wildfly.plugin.common
Class Archives
- java.lang.Object
-
- org.wildfly.plugin.common.Archives
-
public class Archives extends Object
- Author:
- James R. Perkins
-
-
Constructor Summary
Constructors Constructor Description Archives()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Pathuncompress(Path archiveFile, Path targetDir)Unzips the zip file to the target directory.static Pathuncompress(Path archiveFile, Path targetDir, boolean replaceIfExists)Unzips the zip file to the target directory.
-
-
-
Method Detail
-
uncompress
public static Path uncompress(Path archiveFile, Path targetDir) throws IOException
Unzips the zip file to the target directory.Note this is specific to how WildFly is archived. The first directory is assumed to be the base home directory and will returned.
- Parameters:
archiveFile- the archive to uncompress, can be a.zipor.tar.gztargetDir- the directory to extract the zip file to- Returns:
- the path to the extracted directory
- Throws:
IOException- if an I/O error occurs
-
uncompress
public static Path uncompress(Path archiveFile, Path targetDir, boolean replaceIfExists) throws IOException
Unzips the zip file to the target directory.Note this is specific to how WildFly is archived. The first directory is assumed to be the base home directory and will returned.
- Parameters:
archiveFile- the archive to uncompress, can be a.zipor.tar.gztargetDir- the directory to extract the zip file toreplaceIfExists- iftruereplace the existing files if they exist- Returns:
- the path to the extracted directory
- Throws:
IOException- if an I/O error occurs
-
-