private function read(ServerRequestInterface $request, string $file): ResponseInterface
    {
        $resource = $this->filesystem->readStream($file);

        if ($resource === false) {
            throw new RuntimeException(sprintf('Unable to read the file "%s"', $file)); //@codeCoverageIgnore
        }

        $response = $this->createResponse()->withBody($this->createStreamFromResource($resource));

        return self::range($response, $request->getHeaderLine('Range'));
    }