4 include_once
"Services/BackgroundTask/interfaces/interface.ilBackgroundTaskHandler.php";
44 $this->filename = $a_value;
64 $this->task = $a_task;
79 $this->log->debug(
"start");
88 if($this->task->isToBeCancelled())
95 $this->task->setCurrentStep(++$current_step);
104 if($this->task->isToBeCancelled())
111 $this->log->debug(
"end");
121 $this->log->debug(
"");
139 $ilCtrl->setParameterByClass(
"ilbackgroundtaskhub",
"tid", $this->task->getId());
140 $url = $ilCtrl->getLinkTargetByClass(
"ilbackgroundtaskhub",
"deliver",
"",
false,
false);
164 $this->task->delete();
191 if(is_dir($tmp_folder))
194 $successful = !file_exists($tmp_folder);
201 if(file_exists($tmp_file))
203 $successful = @unlink($tmp_file);
static makeDirParents($a_dir)
Create a new directory and all parent directories.
Background task handler interface.
getTempZipFilePath()
Gets the full path of the temporary zip file that gets created.
deleteTempFiles($a_delete_zip=true)
Deletes the temporary files and folders belonging to this download.
Background task handler for zip creation.
getTask()
Get current task instance.
deleteTaskAndFiles()
Remove task and its files.
setDeliveryFilename($a_value)
Sets the delivery file name.
getDeliveryFilename()
Gets the delivery file name.
__construct()
Constructor.
process()
Process the task.
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
gatherFiles()
Copy files to target directory.
Create styles array
The data for the language used.
getTempFolderPath()
Gets the temporary folder path to copy the files and folders to.
static getDataDir()
get data directory (outside webspace)
setTask(ilBackgroundTask $a_task)
Set current task instance.
static getLogger($a_component_id)
Get component logger.
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
getTempBasePath()
Gets the temporary base path for all files and folders related to this download.