/** * Get * @param $currentDirectory * @param $searchFor * @return array */ private function buildSearchedItems($currentDirectory, $searchFor) { if (!$searchFor) { return array(); } $files = $this->Filesystem->search($currentDirectory, $searchFor); return $this->buildMediaItemsFromFiles($files); }
/** * Remove uploaded files from the /media directory * * @param string $filepath * @return void */ public function removeUploadedFile($filepath) { $this->Filesystem->delete($this->basepath . $filepath); }
/** * Renames a category path * * @param $path * @param $newName */ public function renameCategory($path, $newName) { $base = $this->basepath . $path; $this->Filesystem->move($base, dirname($base) . '/' . $newName); }