You are here

public function SessionStreamWrapper::stream_truncate in Examples for Developers 3.x

Same name and namespace in other branches
  1. 8 stream_wrapper_example/src/StreamWrapper/SessionStreamWrapper.php \Drupal\stream_wrapper_example\StreamWrapper\SessionStreamWrapper::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 PhpStreamWrapperInterface::stream_truncate

See also

ftruncate()

http://php.net/manual/en/streamwrapper.stream-truncate.php

File

modules/stream_wrapper_example/src/StreamWrapper/SessionStreamWrapper.php, line 411

Class

SessionStreamWrapper
Example stream wrapper class to handle session:// streams.

Namespace

Drupal\stream_wrapper_example\StreamWrapper

Code

public function stream_truncate($new_size) {

  // @codingStandardsIgnoreEnd
  return FALSE;
}