function LocalStream::stream_seek

Same name and namespace in other branches
  1. 11.x 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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.