Example #1
0
 /**
  * Change path
  *
  * @param string $path Go to the path
  * @return FileManager
  */
 public function in($path)
 {
     $this->path->updatePath($path);
     $this->file->setPath($this->path);
     $this->uploader->setPath($this->path);
     $this->folder->setPath($this->path);
     return $this;
 }
Example #2
0
 /**
  * Update file when path manager is set up
  *
  * @param Path $path
  */
 protected function onPathUpdate(Path $path)
 {
     $this->file->dir = $this->url->pathToUrl($path->relativePath());
     $this->thumb->setPath($path);
 }
Example #3
0
 /**
  * Get url to folder content
  *
  * @param Path $path
  * @param null|string $name
  * @return string
  */
 public function forFolder(Path $path, $name = null)
 {
     $folder_path = FileSystem::join($path->relativePath(), $name);
     return action($this->dir_action, $this->pathToUrl($folder_path));
 }