Ejemplo n.º 1
0
 public function cut()
 {
     try {
         foreach ($this->params->files as $path) {
             $file = BasefileModel::createFromPath($path);
             if ($file) {
                 if (!$file->moveTo($this->params->target)) {
                     return new ResponseError(gettext("Не удалось перенести файлы."));
                 }
             }
         }
         $data = BasefileModel::findByDir($this->params->target);
         return new Response($data);
     } catch (Exception $ex) {
         Log::exception($ex);
     }
     return new ResponseError(gettext("Не удалось перенести файлы."));
 }
Ejemplo n.º 2
0
 public function getChildren($isInfo = true, $isHidden = true)
 {
     return BasefileModel::findByDir($this->dir . '/' . $this->name, $isInfo, $isHidden);
 }