rmFile() public static method

Since: 0.8
public static rmFile ( $file ) : boolean
$file
return boolean
Ejemplo n.º 1
0
 /**
  * @return null|string
  */
 public function getFilePath()
 {
     if (!$this->attribute->isType(Attribute::TYPE_FILE)) {
         return null;
     }
     $file = Yii::app()->getBasePath() . '/' . Yii::app()->getModule('yupe')->uploadPath . '/' . Yii::app()->getModule('store')->uploadPath . '/product/' . $this->value();
     return \yupe\helpers\YFile::rmFile($file);
 }
Ejemplo n.º 2
0
 /**
  * Обновить конфигурационный файл модуля
  *
  * @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;
 }