Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SeekableFileContent.php

function SeekableFileContent::write

writes an amount of data

Parameters

string $data:

Return value

int amount of written bytes

Overrides FileContent::write

File

vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/content/SeekableFileContent.php, line 96

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal