src/Viserio/Component/Filesystem/FilesystemAdapter.php
public function url(string $path): string
    {
        $adapter = $this->driver;

        if ($adapter instanceof AwsS3Adapter) {
            $path = $adapter->getPathPrefix() . $path;

            return $adapter->getClient()->getObjectUrl($adapter->getBucket(), $path);
        }

        if ($adapter instanceof LocalAdapter) {
            if (isset($this->config['url'])) {
                return$this->config['url'] . \DIRECTORY_SEPARATOR . $path;
            }

            return $adapter->getPathPrefix() . $path;
        }

        if (\method_exists($adapter, 'getUrl')) {
            return $adapter->getUrl($path);
        }

        throw new RuntimeException('This driver does not support retrieving URLs.');
    }
public function url(string $path): string
    {
        $adapter = $this->driver;

        if ($adapter instanceof AwsS3Adapter) {
            $path = $adapter->getPathPrefix() . $path;

            return $adapter->getClient()->getObjectUrl($adapter->getBucket(), $path);
        }

        if ($adapter instanceof LocalAdapter) {
            if (isset($this->config['url'])) {
                return$this->config['url'] . \DIRECTORY_SEPARATOR . $path;
            }

            return $adapter->getPathPrefix() . $path;
        }

        if (\method_exists($adapter, 'getUrl')) {
            return $adapter->getUrl($path);
        }

        throw new RuntimeException('This driver does not support retrieving URLs.');
    }
{@inheritdoc}

@throws \RuntimeException