/** * Renames an uploaded file * * @param string $filepath * @param string $newpath * @return void */ public function renameUploadedFile($filepath, $newpath) { if ($this->Caption->exists($this->basepath . $filepath)) { $oldCptPath = $this->MediaPaths->imageCaptionPath($this->basepath . $filepath); $newCptPath = $this->MediaPaths->imageCaptionPath($this->basepath . $newpath); $this->Filesystem->rename($oldCptPath, $newCptPath); } return $this->Filesystem->rename($this->basepath . $filepath, $this->basepath . $newpath); }
/** * Renames an uploaded file * * @param string $filepath * @param string $newpath * @return void */ public function renameUploadedFile($filepath, $newpath) { return $this->Filesystem->rename($this->basepath . $filepath, $this->basepath . $newpath); }