33 private \ILIAS\Filesystem\Util\Archive\Archives
$archives;
41 $this->
logger = $DIC->logger()->cal();
42 $this->archives = $DIC->archives();
82 $this->
logger->debug(
'Start zipping input dir!');
83 $this->
logger->dump($input);
84 $string = $input[0]->getValue();
85 $tmpdir = rtrim($string,
"/");
86 $this->
logger->debug(
'Zipping directory:' . $tmpdir);
87 $zip_name = $tmpdir .
'.zip';
89 $zip = $this->archives->zip([]);
90 $zip->addDirectory($tmpdir);
91 $zip_stream = $zip->get();
92 stream_copy_to_stream($zip_stream->detach(), fopen($zip_name,
'wb'));
98 $zip_file_name->setValue($zip_name);
100 return $zip_file_name;
ILIAS Filesystem Util Archive Archives $archives
Class ChatMainBarProvider .
run(array $input, \ILIAS\BackgroundTasks\Observer $observer)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
getExpectedTimeOfTaskInSeconds()
int the amount of seconds this task usually taskes. If your task-duration scales with the the amount ...
Description of class class.