Exemplo n.º 1
0
 public function renameById($pId, $pPath)
 {
     $p = $this->getPathById($pId);
     $e = explode('.', $p);
     $ext = end($e);
     $pPath .= "." . $ext;
     if ($p === $pPath) {
         return;
     }
     File::rename($p, $pPath);
     $this->updateUpload($pId, $pPath);
 }
Exemplo n.º 2
0
 /**
  * @param  $pNewName
  * @return void
  */
 public function renameFolder($pNewName)
 {
     File::rename($this->pathFile, $pNewName . $this->fileName . "." . $this->fileType);
     $this->folder = $pNewName;
     $this->pathFile = $this->folder . $this->fileName . "." . $this->fileType;
     $this->model_upload->updateById($this->id_upload, array("path_upload" => $this->pathFile));
 }