/** {@inheritdoc} */ public function file_exists($path) { try { $path = $this->cleanPath($path); $cachedState = $this->statCache->get($path); if ($cachedState === false) { // we know the file doesn't exist return false; } else { if (!is_null($cachedState)) { return true; } } // need to get from server $this->propfind($path); return true; //no 404 exception } catch (ClientHttpException $e) { if ($e->getHttpStatus() === 404) { return false; } $this->convertException($e); } catch (\Exception $e) { $this->convertException($e); } return false; }