untar
public static void untar(java.nio.file.Path file,
java.nio.file.Path to,
boolean useGroup,
boolean useOwner)
throws java.io.IOException
Untars a TAR file. This also handles tar.gz files by checking the file extension. If the file extension ends in .gz
it will read the tarball through a GZIPInputStream.
- Parameters:
file
- The TAR file.
to
- The directory to untar to.
useGroup
- Determines if the group name in the archive is used.
useOwner
- Determines if the owner name in the archive is used.
- Throws:
java.io.IOException
- If the untar fails.