dcase_util.files.Package.compress

Package.compress(filename=None, path=None, file_list=None, size_limit=None)

Compress the package. Supports Zip and Tar packages.

Parameters
filenamestr

Filename for the package. If None given, one given to class initializer is used. Default value None

pathstr

Path get files if file_list is not set. Files are collected recursively. Default value None

file_listlist of dict

List of files to be included to the package. Item format {‘source’: ‘file1.txt’, ‘target’: ‘folder1/file1.txt’}. Default value None

size_limitint

Size limit in bytes. Default value None

Returns
list of str

Filenames of created packages