Description of class class.
More...
Description of class class.
- Author
- Jesús López lopez.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Definition at line 14 of file class.ilSubmissionsZipJob.php.
◆ __construct()
ilSubmissionsZipJob::__construct |
( |
| ) |
|
◆ getExpectedTimeOfTaskInSeconds()
ilSubmissionsZipJob::getExpectedTimeOfTaskInSeconds |
( |
| ) |
|
- Returns
- int the amount of seconds this task usually taskes. If your task-duration scales with the the amount of data, try to set a possible high value of try to calculate it. If a task duration exceeds this value, it will be displayed as "possibly failed" to the user
Implements ILIAS\BackgroundTasks\Task\Job.
Definition at line 86 of file class.ilSubmissionsZipJob.php.
◆ getInputTypes()
ilSubmissionsZipJob::getInputTypes |
( |
| ) |
|
◆ getOutputType()
ilSubmissionsZipJob::getOutputType |
( |
| ) |
|
◆ isStateless()
ilSubmissionsZipJob::isStateless |
( |
| ) |
|
◆ run()
- Todo:
- use filsystem service
Definition at line 58 of file class.ilSubmissionsZipJob.php.
References ilUtil\delDir(), and ilUtil\zip().
60 $tmpdir =
$input[0]->getValue();
62 $this->logger->debug(
"Calling zip...");
63 $this->logger->debug(
"... dir: " . $tmpdir);
64 $this->logger->debug(
"... file: " . $tmpdir .
'.zip');
68 $this->logger->debug(
"Deleting dir: " . $tmpdir);
71 $this->logger->debug(
"Check zip file exists.");
72 if (is_file($tmpdir .
'.zip')) {
73 $this->logger->debug(
"File ok.");
75 $this->logger->debug(
"File missing.");
79 $zip_file_name->setValue($tmpdir .
'.zip');
80 return $zip_file_name;
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
◆ $logger
ilSubmissionsZipJob::$logger = null |
|
private |
The documentation for this class was generated from the following file: