
| Current Path : /var/www/html/rocksensor/vendor/consolidation/robo/src/Task/Filesystem/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor/vendor/consolidation/robo/src/Task/Filesystem/MirrorDir.php |
<?php
namespace Robo\Task\Filesystem;
use Robo\Result;
/**
* Mirrors a directory to another
*
* ``` php
* <?php
* $this->taskMirrorDir(['dist/config/' => 'config/'])->run();
* // or use shortcut
* $this->_mirrorDir('dist/config/', 'config/');
*
* ?>
* ```
*/
class MirrorDir extends BaseDir
{
/**
* {@inheritdoc}
*/
public function run()
{
foreach ($this->dirs as $src => $dst) {
$this->fs->mirror(
$src,
$dst,
null,
[
'override' => true,
'copy_on_windows' => true,
'delete' => true
]
);
$this->printTaskInfo("Mirrored from {source} to {destination}", ['source' => $src, 'destination' => $dst]);
}
return Result::success($this);
}
}