katana.units.tar.extract — Extract TAR archive

TAR archive extraction

This is done with the built-in Python library tarfile, so there is

Note that TAR files do not have support for passwords, so that is not implemented here.

The unit inherits from katana.unit.FileUnit to ensure the target is a TAR archive.

class katana.units.tar.extract.Unit(*args, **kwargs)

Bases: katana.unit.FileUnit

GROUPS = ['tar', 'archive']

The constructor is included just to provide a keyword for the FileUnit, ensuring the provided target is in fact a TAR archive.

PRIORITY = 30

Priority works with 0 being the highest priority, and 100 being the lowest priority. 50 is the default priorty. This unit has a moderately high priority due to speed and broadness of applicability

RECURSE_SELF = True

In case we have nested TARs, we CAN recurse into ourselves.

evaluate(case: str)

Evaluate the target. Extract the target with TAR and recurse on any new found files.

Parameters:case – A case returned by enumerate. For this unit, the enumerate function is not used.
Returns:None. This function should not return any data.