source/Core/UtilsFile.php
public function copyDir($sSourceDir, $sTargetDir)
    {
        $oStr = getStr();
        $handle = opendir($sSourceDir);
        while (false !== ($file = readdir($handle))) {
            if ($file != '.' && $file != '..') {
                if (is_dir($sSourceDir . '/' . $file)) {
                    // recursive
                    $sNewSourceDir = $sSourceDir . '/' . $file;
                    $sNewTargetDir = $sTargetDir . '/' . $file;
                    if (strcasecmp($file, 'CVS') && strcasecmp($file, '.svn')) {
                        @mkdir($sNewTargetDir, 0777);
                        $this->copyDir($sNewSourceDir, $sNewTargetDir);
                    }
                } else {
                    $sSourceFile = $sSourceDir . '/' . $file;
                    $sTargetFile = $sTargetDir . '/' . $file;

                    //do not copy files within dyn_images
                    if (!$oStr->strstr($sSourceDir, 'dyn_images') || $file == 'nopic.jpg' || $file == 'nopic_ico.jpg') {
                        @copy($sSourceFile, $sTargetFile);
                    }
                }
            }
        }
        closedir($handle);
    }
public function copyDir($sSourceDir, $sTargetDir)
    {
        $oStr = getStr();
        $handle = opendir($sSourceDir);
        while (false !== ($file = readdir($handle))) {
            if ($file != '.' && $file != '..') {
                if (is_dir($sSourceDir . '/' . $file)) {
                    // recursive
                    $sNewSourceDir = $sSourceDir . '/' . $file;
                    $sNewTargetDir = $sTargetDir . '/' . $file;
                    if (strcasecmp($file, 'CVS') && strcasecmp($file, '.svn')) {
                        @mkdir($sNewTargetDir, 0777);
                        $this->copyDir($sNewSourceDir, $sNewTargetDir);
                    }
                } else {
                    $sSourceFile = $sSourceDir . '/' . $file;
                    $sTargetFile = $sTargetDir . '/' . $file;

                    //do not copy files within dyn_images
                    if (!$oStr->strstr($sSourceDir, 'dyn_images') || $file == 'nopic.jpg' || $file == 'nopic_ico.jpg') {
                        @copy($sSourceFile, $sTargetFile);
                    }
                }
            }
        }
        closedir($handle);
    }
public function copyDir ( $ sSourceDir , $ sTargetDir ) { $ oStr = getStr ( ) ; $ handle = opendir ( $ sSourceDir ) ; while ( false !== ( $ file = readdir ( $ handle ) ) ) { if ( $ file != '.' && $ file != '..' ) { if ( is_dir ( $ sSourceDir . '/' . $ file ) ) { // recursive $ sNewSourceDir = $ sSourceDir . '/' . $ file ; $ sNewTargetDir = $ sTargetDir . '/' . $ file ; if ( strcasecmp ( $ file , 'CVS' ) && strcasecmp ( $ file , '.svn' ) ) { @ mkdir ( $ sNewTargetDir , 0777 ) ; $ this -> copyDir ( $ sNewSourceDir , $ sNewTargetDir ) ; } } else { $ sSourceFile = $ sSourceDir . '/' . $ file ; $ sTargetFile = $ sTargetDir . '/' . $ file ; //do not copy files within dyn_images if ( ! $ oStr -> strstr ( $ sSourceDir , 'dyn_images' ) || $ file == 'nopic.jpg' || $ file == 'nopic_ico.jpg' ) { @ copy ( $ sSourceFile , $ sTargetFile ) ; } } } } closedir ( $ handle ) ; }
Copies directory tree for creating a new shop.

@param string $sSourceDir Source directory
@param string $sTargetDir Target directory
Copies directory tree for creating a new shop .