You are here

public function ReplicateAdapter::writeStream in Flysystem 7

File

src/Flysystem/Adapter/ReplicateAdapter.php, line 42
Contains \Drupal\flysystem\Flysystem\Adapter\ReplicateAdapter.

Class

ReplicateAdapter
@todo Remove after https://github.com/thephpleague/flysystem-replicate-adapter/pull/5

Namespace

Drupal\flysystem\Flysystem\Adapter

Code

public function writeStream($path, $resource, Config $config) {
  if (!$this->source
    ->writeStream($path, $resource, $config)) {
    return FALSE;
  }
  if (!($resource = $this
    ->ensureSeekable($resource, $path))) {
    return FALSE;
  }
  return $this->replica
    ->writeStream($path, $resource, $config);
}