cpFile() public static method

Since: 0.8
public static cpFile ( $from, $to ) : boolean
$from
$to
return boolean
コード例 #1
0
ファイル: ModuleManager.php プロジェクト: sepaker/yupe
 /**
  * Обновить конфигурационный файл модуля
  *
  * @param WebModule $module
  * @return bool
  * @since 0.8
  */
 public function updateModuleConfig(WebModule $module)
 {
     $newConfig = $this->getModulesConfigDefault($module->getId());
     $currentConfig = $this->getModulesConfig($module->getId());
     if ((!file_exists($currentConfig) || YFile::rmFile($currentConfig)) && YFile::cpFile($newConfig, $currentConfig)) {
         return true;
     }
     return false;
 }