46 new SingleType(ilWorkspaceCopyDefinition::class)
71 $definition = $input[0];
73 $this->logger->info(
'Called copy files job');
75 $this->target_directory = $definition->getTempDir();
83 $this->
copyFiles($targetdir, $definition);
88 $this->logger->debug(
'Returning new tempdirectory: ' . $targetdir);
91 $out->setValue($targetdir);
104 $this->logger->info(
'New temp directory: ' . $tmpdir);
112 $this->logger->info(
'New final directory: ' . $final_dir);
128 if ($is_empty_folder) {
129 mkdir($tmpdir .
'/' . $copy_task[ilWorkspaceCopyDefinition::COPY_TARGET_DIR]);
130 $this->logger->notice(
'Empty folder has been created: ' . $tmpdir .
'/' . $copy_task[ilWorkspaceCopyDefinition::COPY_SOURCE_DIR]);
132 $this->logger->notice(
'Cannot find file: ' . $copy_task[ilWorkspaceCopyDefinition::COPY_SOURCE_DIR]);
138 $tmpdir .
'/' . dirname($copy_task[ilWorkspaceCopyDefinition::COPY_TARGET_DIR])
141 $this->logger->debug(
143 $copy_task[ilWorkspaceCopyDefinition::COPY_SOURCE_DIR] .
145 $tmpdir .
'/' . $copy_task[ilWorkspaceCopyDefinition::COPY_TARGET_DIR]
149 $copy_task[ilWorkspaceCopyDefinition::COPY_SOURCE_DIR],
150 $tmpdir .
'/' . $copy_task[ilWorkspaceCopyDefinition::COPY_TARGET_DIR]
static makeDirParents($a_dir)
Create a new directory and all parent directories.
__construct()
Constructor.
getCopyDefinitions()
Get copy definitions.
copyFiles($tmpdir, ilWorkspaceCopyDefinition $definition)
Copy files.
getExpectedTimeOfTaskInSeconds()
int the amount of seconds this task usually taskes. If your task-duration scales with the the amount ...
Copy definition for worspace folders.
createUniqueTempDirectory()
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.
createTargetDirectory($a_tmpdir)
Description of class class.
static getLogger($a_component_id)
Get component logger.