Inheritance: extends Illuminate\Filesystem\Filesystem
Example #1
0
 /**
  * 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);
 }
Example #2
0
 /**
  * Remove uploaded files from the /media directory
  *
  * @param  string $filepath
  * @return void
  */
 public function removeUploadedFile($filepath)
 {
     $this->Filesystem->delete($this->basepath . $filepath);
 }
Example #3
0
 /**
  * Renames a category path
  *
  * @param $path
  * @param $newName
  */
 public function renameCategory($path, $newName)
 {
     $base = $this->basepath . $path;
     $this->Filesystem->move($base, dirname($base) . '/' . $newName);
 }