act.utils.pack_tar

act.utils.pack_tar(filenames, write_filename=None, write_directory=None, remove=False)[source]

Creates TAR file from list of filenames provided. Currently only works with all files existing in the same directory.

Parameters:
  • filenames (str or list) – Filenames to be placed in TAR file

  • write_filename (str, pathlib.Path, None) – TAR output filename. If not provided will use file name ‘created_tarfile.tar’

  • write_directory (str, pathlib.Path, None) – Path to directory to write TAR file. If the directory does not exist will be created.

  • remove (boolean) – Delete provided filenames after making TAR file

Returns:

list – List of files extracted from the TAR file or full path to created direcotry containing extracted files.