public function DrupalLocalStreamWrapper::stream_seek

public DrupalLocalStreamWrapper::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

includes/stream_wrappers.inc, line 497
Drupal stream wrapper interface.

Class

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!stream_wrappers.inc/function/DrupalLocalStreamWrapper::stream_seek/7.x