You are here

public function LocalReadOnlyStream::stream_truncate in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php \Drupal\Core\StreamWrapper\LocalReadOnlyStream::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.

Overrides LocalStream::stream_truncate

File

core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php, line 143
Contains \Drupal\Core\StreamWrapper\LocalReadOnlyStream.

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