Exemplo n.º 1
0
 function _copyThemesFiles($theme, $alias)
 {
     $themePath = R_P . 'mode/area/themes/' . $theme;
     $channelPath = $this->getChannelPath($alias);
     L::loadClass('fileoperate', 'utility', false);
     PW_FileOperate::copyFiles($themePath, $channelPath);
 }
Exemplo n.º 2
0
 function copyFiles($source, $dest)
 {
     $source = S::escapePath($source);
     $dest = S::escapePath($dest);
     $folder = opendir($source);
     while ($file = readdir($folder)) {
         if ($file == '.' || $file == '..' || strpos($file, '.') === 0) {
             continue;
         }
         if (is_dir($source . '/' . $file)) {
             PW_FileOperate::createFolder($dest . '/' . $file);
             PW_FileOperate::copyFiles($source . '/' . $file, $dest . '/' . $file);
         } else {
             PW_FileOperate::copyfile($source . '/' . $file, $dest . '/' . $file);
         }
     }
     closedir($folder);
     return 1;
 }