public function doCopy()
    {
        foreach ($this->toCopy as $copy) {
            list($source, $destination) = $copy;
            if (!$this->isAbsolute($source)) {
                $source = $this->getSourceFile($source);
            }
            $destination = $this->getTargetFile($destination);

            if (is_dir($source) && is_dir($destination)) {
                $destination = dirname($destination);
            }

            shell_exec('cp -R '.$source.' '.$destination);
        }
    }
public function doCopy()
    {
        foreach ($this->toCopy as $copy) {
            list($source, $destination) = $copy;
            if (!$this->isAbsolute($source)) {
                $source = $this->getSourceFile($source);
            }
            $destination = $this->getTargetFile($destination);

            if (is_dir($source) && is_dir($destination)) {
                $destination = dirname($destination);
            }

            shell_exec('cp -R '.$source.' '.$destination);
        }
    }
public function doCopy ( ) { foreach ( $ this -> toCopy as $ copy ) { list ( $ source , $ destination ) = $ copy ; if ( ! $ this -> isAbsolute ( $ source ) ) { $ source = $ this -> getSourceFile ( $ source ) ; } $ destination = $ this -> getTargetFile ( $ destination ) ; if ( is_dir ( $ source ) && is_dir ( $ destination ) ) { $ destination = dirname ( $ destination ) ; } shell_exec ( 'cp -R ' . $ source . ' ' . $ destination ) ; } }
Run the copy
Run the copy