/** * {@inheritdoc} */ public function close() : Awaitable { if (!$this->closed) { parent::close(); if ($this->cascadeClose) { return $this->stream->close(); } } return new Success(null); }
/** * {@inheritdoc} */ public function close() : Awaitable { if (!$this->closed) { parent::close(); if ($this->resource !== null) { try { return $this->filesystem->closeFile($this->resource, $this->file); } finally { $this->resource = null; } } } return new Success(null); }