1.104. decompress

Full Name: herschel.ia.toolbox.util.DecompressTask
Alias: decompress
Type: Java Task - Java Task
Import: from herschel.ia.toolbox.util import DecompressTask
Category

Session utilities

Description

Decompresses archives.

Decompresses a (relative path) compressed archive in a user-chosen directory Two first arguments are mandatory. Supported algorimths are: TAR, ZIP, GZIP (and TAR.GAZ).

Example

Example 1: Untarring in temp directory
decompress("./mytar.tar", "/tmp")

Limitations

The archive will not be deleted.

API details

Properties

String archive [INPUT, MANDATORY, default=null]

Path of the archive to be decompressed.

String dirout [INPUT, MANDATORY, default=null]

Directory (that may not exist yet) where we want to decompress the archive.

String compression [INPUT, OPTIONAL, default="Guess"]

Type of compression of the input file. Possible values are:

  • "Guess" (default, find-outs the compression used)

  • "ZIP" (archive was compressed with zip)

  • "TAR" (archive was packed with tar)

  • "GZ" (archive was compressed with gzip)

  • "TGZ" (archive was compressed with gzip after being packed with tar)

Boolean overwrite [INPUT, OPTIONAL, default=True]

If set to false, it will not update already existing files.

See also

History

  • 2010-05-25 - JDS: first release
  • 2010-06-09 - JDS: expanded, renamed to decompress
  • 2010-08-16 - JDS: added an overwrite flag