You are here

public function SeekableFileContent::write in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/content/SeekableFileContent.php \org\bovigo\vfs\content\SeekableFileContent::write()

writes an amount of data

Parameters

string $data:

Return value

amount of written bytes

Overrides FileContent::write

File

vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/content/SeekableFileContent.php, line 91

Class

SeekableFileContent
Default implementation for file contents based on simple strings.

Namespace

org\bovigo\vfs\content

Code

public function write($data) {
  $dataLength = strlen($data);
  $this
    ->doWrite($data, $this->offset, $dataLength);
  $this->offset += $dataLength;
  return $dataLength;
}