You are here

public function PhpStreamWrapperInterface::stream_eof in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php \Drupal\Core\StreamWrapper\PhpStreamWrapperInterface::stream_eof()
  2. 9 core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php \Drupal\Core\StreamWrapper\PhpStreamWrapperInterface::stream_eof()

Tests for end-of-file on a file pointer.

This method is called in response to feof().

Warning, when reading the whole file (for example, with file_get_contents()), PHP will call PhpStreamWrapperInterface::stream_read() followed by PhpStreamWrapperInterface::stream_eof() in a loop but as long as PhpStreamWrapperInterface::stream_read() returns a non-empty string, the return value of PhpStreamWrapperInterface::stream_eof() is ignored.

Return value

bool Should return TRUE if the read/write position is at the end of the stream and if no more data is available to be read, or FALSE otherwise.

See also

feof()

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

1 method overrides PhpStreamWrapperInterface::stream_eof()
DummyExternalReadOnlyWrapper::stream_eof in core/modules/file/tests/file_test/src/StreamWrapper/DummyExternalReadOnlyWrapper.php
@inheritDoc

File

core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php, line 204

Class

PhpStreamWrapperInterface
Defines a generic PHP stream wrapper interface.

Namespace

Drupal\Core\StreamWrapper

Code

public function stream_eof();