function LocalStream::stream_flush
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/StreamWrapper/LocalStream.php \Drupal\Core\StreamWrapper\LocalStream::stream_flush()
- 8.9.x core/lib/Drupal/Core/StreamWrapper/LocalStream.php \Drupal\Core\StreamWrapper\LocalStream::stream_flush()
- 11.x core/lib/Drupal/Core/StreamWrapper/LocalStream.php \Drupal\Core\StreamWrapper\LocalStream::stream_flush()
Flushes the output.
This method is called in response to fflush() and when the stream is being closed while any un-flushed data has been written to it before. If you have cached data in your stream but not yet stored it into the underlying storage, you should do so now.
Note, if not implemented, FALSE is assumed as the return value.
Return value
bool Should return TRUE if the cached data was successfully stored (or if there was no data to store), or FALSE if the data could not be stored.
Overrides PhpStreamWrapperInterface::stream_flush
1 method overrides LocalStream::stream_flush()
- LocalReadOnlyStream::stream_flush in core/
lib/ Drupal/ Core/ StreamWrapper/ LocalReadOnlyStream.php - Support for fflush().
File
-
core/
lib/ Drupal/ Core/ StreamWrapper/ LocalStream.php, line 209
Class
- LocalStream
- Defines a Drupal stream wrapper base class for local files.
Namespace
Drupal\Core\StreamWrapperCode
public function stream_flush() {
return fflush($this->handle);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.