src/Viserio/Component/Filesystem/FilesystemAdapter.php
public function put(string $path, $contents, array $config = []): bool
    {
        $config['visibility'] = $this->parseVisibility($config['visibility'] ?? null) ?: [];

        $flyConfig = new FlyConfig($config);

        if (\is_resource($contents)) {
            if ($this->has($path)) {
                return $this->driver->updateStream($path, $contents, $flyConfig) !== false;
            }

            return $this->driver->writeStream($path, $contents, $flyConfig) !== false;
        }

        if ($this->has($path)) {
            return $this->driver->update($path, $contents, $flyConfig) !== false;
        }

        return $this->driver->write($path, $contents, $flyConfig) !== false;
    }
public function put(string $path, $contents, array $config = []): bool
    {
        $config['visibility'] = $this->parseVisibility($config['visibility'] ?? null) ?: [];

        $flyConfig = new FlyConfig($config);

        if (\is_resource($contents)) {
            if ($this->has($path)) {
                return $this->driver->updateStream($path, $contents, $flyConfig) !== false;
            }

            return $this->driver->writeStream($path, $contents, $flyConfig) !== false;
        }

        if ($this->has($path)) {
            return $this->driver->update($path, $contents, $flyConfig) !== false;
        }

        return $this->driver->write($path, $contents, $flyConfig) !== false;
    }
{@inheritdoc}