/** * 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; }
/** * 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); }
/** * 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)); }