/** * @param string $path * @return \Icewind\SMB\IFileInfo */ protected function getFileInfo($path) { $path = $this->buildPath($path); if (!isset($this->statCache[$path])) { $this->statCache[$path] = $this->share->stat($path); } return $this->statCache[$path]; }
/** * @param string $path * @return \Icewind\SMB\IFileInfo * @throws StorageNotAvailableException */ protected function getFileInfo($path) { try { $path = $this->buildPath($path); if (!isset($this->statCache[$path])) { $this->statCache[$path] = $this->share->stat($path); } return $this->statCache[$path]; } catch (ConnectException $e) { throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); } }