You are here

public function S3fsStream::stream_truncate in S3 File System 8.2

Same name and namespace in other branches
  1. 8.3 src/StreamWrapper/S3fsStream.php \Drupal\s3fs\StreamWrapper\S3fsStream::stream_truncate()
  2. 4.0.x src/StreamWrapper/S3fsStream.php \Drupal\s3fs\StreamWrapper\S3fsStream::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

File

src/StreamWrapper/S3fsStream.php, line 809

Class

S3fsStream
Defines a Drupal s3fs (s3fs://) stream wrapper class.

Namespace

Drupal\s3fs\StreamWrapper

Code

public function stream_truncate($new_size) {
  return ftruncate($this->handle, $new_size);
}