1 stream_wrappers.inc public BackdropLocalStreamWrapper::stream_seek($offset, $whence)

Support for fseek().

Parameters

$offset: The byte offset to got to.

$whence: SEEK_SET, SEEK_CUR, or SEEK_END.

Return value

TRUE on success.:

Overrides StreamWrapperInterface::stream_seek

See also

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

File

core/includes/stream_wrappers.inc, line 500
Backdrop stream wrapper interface.

Class

BackdropLocalStreamWrapper
Backdrop stream wrapper base class for local files.

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