public function copyDir($source, $target, $dir)
    {
        $this->mkDir($target);
        $serverOs = (new \Zest\Common\OperatingSystem())->get();
        $command = ($serverOs === 'Windows') ? 'xcopy ' : 'cp -r ';
        if (is_dir($source.$dir)) {
            shell_exec($command.$source.$dir.' '.$target);
        }
    }
public function copyDir($source, $target, $dir)
    {
        $this->mkDir($target);
        $serverOs = (new \Zest\Common\OperatingSystem())->get();
        $command = ($serverOs === 'Windows') ? 'xcopy ' : 'cp -r ';
        if (is_dir($source.$dir)) {
            shell_exec($command.$source.$dir.' '.$target);
        }
    }
public function copyDir ( $ source , $ target , $ dir ) { $ this -> mkDir ( $ target ) ; $ serverOs = ( new \ Zest \ Common \ OperatingSystem ( ) ) -> get ( ) ; $ command = ( $ serverOs === 'Windows' ) ? 'xcopy ' : 'cp -r ' ; if ( is_dir ( $ source . $ dir ) ) { shell_exec ( $ command . $ source . $ dir . ' ' . $ target ) ; } }
Copy dir.

@param (string) $source Directory with path.
@param (string) $target Target directory.
@param (string) $dir    Directory to be copied.

@since 3.0.0

@return void
Copy dir .