You are here

public function S3fsStreamWrapper::stream_write in S3 File System 7

Same name and namespace in other branches
  1. 7.2 S3fsStreamWrapper.inc \S3fsStreamWrapper::stream_write()

Support for fwrite(), file_put_contents() etc.

Parameters

string $data: The string to be written.

Return value

int The number of bytes written.

Overrides StreamWrapperInterface::stream_write

See also

http://php.net/manual/en/streamwrapper.stream-write.php

File

./S3fsStreamWrapper.inc, line 629
Drupal stream wrapper implementation for S3 File System.

Class

S3fsStreamWrapper
The stream wrapper class.

Code

public function stream_write($data) {
  $bytes = strlen($data);
  $this
    ->_debug("stream_write() called with {$bytes} bytes of data for {$this->uri}.");
  return $this->body
    ->write($data);
}