You are here

public function LocalStream::stream_seek in Drupal 10

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

File

core/lib/Drupal/Core/StreamWrapper/LocalStream.php, line 200

Class

LocalStream
Defines a Drupal stream wrapper base class for local files.

Namespace

Drupal\Core\StreamWrapper

Code

public function stream_seek($offset, $whence = SEEK_SET) {

  // fseek returns 0 on success and -1 on a failure.
  // stream_seek   1 on success and  0 on a failure.
  return !fseek($this->handle, $offset, $whence);
}