Class TarTools

java.lang.Object
org.savantbuild.io.tar.TarTools

public class TarTools extends Object
Tarball tools.
  • Constructor Details

    • TarTools

      public TarTools()
  • Method Details

    • untar

      public static void untar(Path file, Path to, boolean useGroup, boolean useOwner) throws 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:
      IOException - If the untar fails.