function LocalReadOnlyStream::stream_truncate

Same name in other branches
  1. 9 core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php \Drupal\Core\StreamWrapper\LocalReadOnlyStream::stream_truncate()
  2. 8.9.x core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php \Drupal\Core\StreamWrapper\LocalReadOnlyStream::stream_truncate()
  3. 10 core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php \Drupal\Core\StreamWrapper\LocalReadOnlyStream::stream_truncate()

Overrides LocalStream::stream_truncate

File

core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php, line 119

Class

LocalReadOnlyStream
Defines a read-only Drupal stream wrapper base class for local files.

Namespace

Drupal\Core\StreamWrapper

Code

public function stream_truncate($new_size) {
    trigger_error('stream_truncate() not supported for read-only stream wrappers', E_USER_WARNING);
    return FALSE;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.