public function LocalStream::stream_truncate in System stream wrapper 8
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
1 method overrides LocalStream::stream_truncate()
- LocalReadOnlyStream::stream_truncate in src/
StreamWrapper/ LocalReadOnlyStream.php - Truncate stream.
File
- src/
StreamWrapper/ LocalStream.php, line 301
Class
- LocalStream
- Defines a Drupal stream wrapper base class for local files.
Namespace
Drupal\system_stream_wrapper\StreamWrapperCode
public function stream_truncate($new_size) {
return ftruncate($this->handle, $new_size);
}