35 $this->logger =
$GLOBALS[
'DIC']->logger()->cal();
74 $definition = $input[0];
76 $this->logger->info(
'Called copy files job');
78 $this->target_directory = $definition->getTempDir();
86 $this->
copyFiles($targetdir, $definition);
91 $this->logger->debug(
'Returning new tempdirectory: ' . $targetdir);
94 $out->setValue($targetdir);
109 $this->logger->info(
'New temp directory: ' . $tmpdir);
119 $this->logger->info(
'New final directory: ' . $final_dir);
139 $tmpdir .
'/' . dirname($copy_task[ilCopyDefinition::COPY_TARGET_DIR])
145 $is_empty_folder = preg_match_all(
"/\/$/", $copy_task[ilCopyDefinition::COPY_TARGET_DIR]);
146 if ($is_empty_folder) {
147 mkdir($tmpdir .
'/' . $copy_task[ilCopyDefinition::COPY_TARGET_DIR]);
148 $this->logger->notice(
'Empty folder has been created: ' . $tmpdir .
'/' . $copy_task[ilCopyDefinition::COPY_SOURCE_DIR]);
150 $this->logger->notice(
'Cannot find file: ' . $copy_task[ilCopyDefinition::COPY_SOURCE_DIR]);
156 $this->logger->debug(
158 $copy_task[ilCopyDefinition::COPY_SOURCE_DIR] .
160 $tmpdir .
'/' . $copy_task[ilCopyDefinition::COPY_TARGET_DIR]
164 $copy_task[ilCopyDefinition::COPY_SOURCE_DIR],
165 $tmpdir .
'/' . $copy_task[ilCopyDefinition::COPY_TARGET_DIR]
static makeDirParents($a_dir)
Create a new directory and all parent directories.
createUniqueTempDirectory()
getCopyDefinitions()
Get copy definitions.
__construct()
Constructor.
createTargetDirectory($a_tmpdir)
copyFiles($tmpdir, ilCopyDefinition $definition)
Copy files.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Description of class class.
run(array $input, Observer $observer)
run the job
static ilTempnam($a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
Description of class class.
getExpectedTimeOfTaskInSeconds()
int the amount of seconds this task usually taskes. If your task-duration scales with the the amount ...