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