function PhpStreamWrapperInterface::stream_truncate

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

Truncate stream.

Will respond to truncation; e.g., through ftruncate().

Parameters

int $new_size: The new size.

Return value

bool TRUE on success, FALSE otherwise.

2 methods override PhpStreamWrapperInterface::stream_truncate()
LocalStream::stream_truncate in core/lib/Drupal/Core/StreamWrapper/LocalStream.php
Truncate stream.
ReadOnlyStream::stream_truncate in core/lib/Drupal/Core/StreamWrapper/ReadOnlyStream.php
Truncate stream.

File

core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php, line 206

Class

PhpStreamWrapperInterface
Defines a generic PHP stream wrapper interface.

Namespace

Drupal\Core\StreamWrapper

Code

public function stream_truncate($new_size);

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