47 new SingleType(ilWorkspaceCopyDefinition::class)
63 $definition = $input[0];
65 $this->
logger->info(
'Called copy files job');
67 $this->target_directory = $definition->getTempDir();
75 $this->
copyFiles($targetdir, $definition);
80 $this->
logger->debug(
'Returning new tempdirectory: ' . $targetdir);
83 $out->setValue($targetdir);
95 $this->
logger->info(
'New temp directory: ' . $tmpdir);
103 $this->
logger->info(
'New final directory: ' . $final_dir);
115 if ($is_empty_folder) {
117 $this->
logger->notice(
'Empty folder has been created: ' . $tmpdir .
'/' . $copy_task[ilWorkspaceCopyDefinition::COPY_SOURCE_DIR]);
119 $this->
logger->notice(
'Cannot find file: ' . $copy_task[ilWorkspaceCopyDefinition::COPY_SOURCE_DIR]);
125 $tmpdir .
'/' . dirname($copy_task[ilWorkspaceCopyDefinition::COPY_TARGET_DIR])
130 $copy_task[ilWorkspaceCopyDefinition::COPY_SOURCE_DIR] .
132 $tmpdir .
'/' . $copy_task[ilWorkspaceCopyDefinition::COPY_TARGET_DIR]
136 $copy_task[ilWorkspaceCopyDefinition::COPY_SOURCE_DIR],
137 $tmpdir .
'/' . $copy_task[ilWorkspaceCopyDefinition::COPY_TARGET_DIR]
static getLogger(string $a_component_id)
Get component logger.
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
copyFiles(string $tmpdir, ilWorkspaceCopyDefinition $definition)
getExpectedTimeOfTaskInSeconds()
Copy definition for workspace folders.
createUniqueTempDirectory()
Create unique temp directory.
run(array $input, Observer $observer)
static ilTempnam(?string $a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
Description of class class.
createTargetDirectory(string $a_tmpdir)