/** * readahead() * @param integer $length Length * @param integer $offset Offset * @param callable $cb Callback * @param integer $pri Priority * @return resource|false */ public function readahead($length, $offset = null, $cb = null, $pri = EIO_PRI_DEFAULT) { $cb = CallbackWrapper::forceWrap($cb); if (!$this->fd) { if ($cb) { $cb($this, false); } return false; } if (!FileSystem::$supported) { if ($cb) { $cb($this, false); } return false; } $this->offset += $length; return eio_readahead($this->fd, $length, $offset !== null ? $offset : $this->offset, $pri, $cb, $this); }
public function readahead($length, $offset = null, $cb = null, $pri = EIO_PRI_DEFAULT) { if (!FS::$supported) { call_user_func($cb, $this, false); return; } $this->offset += $length; eio_readahead($this->fd, $length, $offset !== null ? $offset : $this->pos, $pri, $cb, $this); return true; }