Class Untar

All Implemented Interfaces:
java.lang.Cloneable

public class Untar
extends Expand
Untar a file.

PatternSets are used to select files to extract from the archive. If no patternset is used, all files are extracted.

FileSets may be used to select archived files to perform unarchival upon.

File permissions will not be restored on extracted files.

The untar task recognizes the long pathname entries used by GNU tar.

Since:
Ant 1.1
  • Constructor Details

  • Method Details

    • setCompression

      public void setCompression​(Untar.UntarCompressionMethod method)
      Set decompression algorithm to use; default=none. Allowable values are
      • none - no compression
      • gzip - Gzip compression
      • bzip2 - Bzip2 compression
      • xz - XZ compression, requires XZ for Java
      Parameters:
      method - compression method
    • setScanForUnicodeExtraFields

      public void setScanForUnicodeExtraFields​(boolean b)
      No unicode extra fields in tar.
      Overrides:
      setScanForUnicodeExtraFields in class Expand
      Parameters:
      b - boolean
      Since:
      Ant 1.8.0
    • expandFile

      protected void expandFile​(FileUtils fileUtils, java.io.File srcF, java.io.File dir)
      Description copied from class: Expand
      This method is to be overridden by extending unarchival tasks.
      Overrides:
      expandFile in class Expand
      Parameters:
      fileUtils - the fileUtils
      srcF - the source file
      dir - the destination directory
      See Also:
      Expand.expandFile(FileUtils, File, File)
    • expandResource

      protected void expandResource​(Resource srcR, java.io.File dir)
      This method is to be overridden by extending unarchival tasks.
      Overrides:
      expandResource in class Expand
      Parameters:
      srcR - the source resource
      dir - the destination directory
      Since:
      Ant 1.7