public function LocalStream::stream_seek

Support for fseek().

Parameters

int $offset: The byte offset to got to.

int $whence: SEEK_SET, SEEK_CUR, or SEEK_END.

Return value

bool TRUE on success.

Overrides PhpStreamWrapperInterface::stream_seek

See also

http://php.net/manual/streamwrapper.stream-seek.php

File

drupal/core/lib/Drupal/Core/StreamWrapper/LocalStream.php, line 286
Definition of Drupal\Core\StreamWrapper\LocalStream.

Class

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

Namespace

Drupal\Core\StreamWrapper

Code

public function stream_seek($offset, $whence) {

  // 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);
}