src/MVC/File/Explorer.php
public function copy($sourceDir, $destinyDir)
    {
        $dir = opendir($sourceDir);
        $this->mkdir($destinyDir);
        while (false !== ( $file = readdir($dir))) {
            if (( $file != '.' ) && ( $file != '..' )) {
                if (is_dir($sourceDir . '/' . $file)) {
                    $this->copy($sourceDir . '/' . $file, $destinyDir . '/' . $file);
                } else {
                    copy($sourceDir . '/' . $file, $destinyDir . '/' . $file);
                }
            }
        }
        closedir($dir);
    }
public function copy($sourceDir, $destinyDir)
    {
        $dir = opendir($sourceDir);
        $this->mkdir($destinyDir);
        while (false !== ( $file = readdir($dir))) {
            if (( $file != '.' ) && ( $file != '..' )) {
                if (is_dir($sourceDir . '/' . $file)) {
                    $this->copy($sourceDir . '/' . $file, $destinyDir . '/' . $file);
                } else {
                    copy($sourceDir . '/' . $file, $destinyDir . '/' . $file);
                }
            }
        }
        closedir($dir);
    }
public function copy ( $ sourceDir , $ destinyDir ) { $ dir = opendir ( $ sourceDir ) ; $ this -> mkdir ( $ destinyDir ) ; while ( false !== ( $ file = readdir ( $ dir ) ) ) { if ( ( $ file != '.' ) && ( $ file != '..' ) ) { if ( is_dir ( $ sourceDir . '/' . $ file ) ) { $ this -> copy ( $ sourceDir . '/' . $ file , $ destinyDir . '/' . $ file ) ; } else { copy ( $ sourceDir . '/' . $ file , $ destinyDir . '/' . $ file ) ; } } } closedir ( $ dir ) ; }
Copy directory to destiny directory

@param string $sourceDir
@param string $destinyDir
Copy directory to destiny directory