public function ReplicateAdapter::updateStream in Flysystem 7
File
- src/
Flysystem/ Adapter/ ReplicateAdapter.php, line 23 - Contains \Drupal\flysystem\Flysystem\Adapter\ReplicateAdapter.
Class
- ReplicateAdapter
- @todo Remove after https://github.com/thephpleague/flysystem-replicate-adapter/pull/5
Namespace
Drupal\flysystem\Flysystem\AdapterCode
public function updateStream($path, $resource, Config $config) {
if (!$this->source
->updateStream($path, $resource, $config)) {
return FALSE;
}
if (!($resource = $this
->ensureSeekable($resource, $path))) {
return FALSE;
}
if ($this->replica
->has($path)) {
return $this->replica
->updateStream($path, $resource, $config);
}
return $this->replica
->writeStream($path, $resource, $config);
}