<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.streamwrapper.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'streamwrapper.stream-seek.php',
    1 => 'streamWrapper::stream_seek',
    2 => 'Seeks to specific location in a stream',
  ),
  'up' => 
  array (
    0 => 'class.streamwrapper.php',
    1 => 'streamWrapper',
  ),
  'prev' => 
  array (
    0 => 'streamwrapper.stream-read.php',
    1 => 'streamWrapper::stream_read',
  ),
  'next' => 
  array (
    0 => 'streamwrapper.stream-set-option.php',
    1 => 'streamWrapper::stream_set_option',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/stream/streamwrapper/stream-seek.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="streamwrapper.stream-seek" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">streamWrapper::stream_seek</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.3.2, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">streamWrapper::stream_seek</span> &mdash; <span class="dc-title">Seeks to specific location in a stream</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-streamwrapper.stream-seek-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>streamWrapper::stream_seek</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$offset</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$whence</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   This method is called in response to <span class="function"><a href="function.fseek.php" class="function">fseek()</a></span>.
  </p>
  <p class="para">
   The read/write position of the stream should be updated according to the
   <code class="parameter">offset</code> and <code class="parameter">whence</code>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-streamwrapper.stream-seek-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">offset</code></dt>
     <dd>
      <p class="para">
       The stream offset to seek to.
      </p>
     </dd>
    
    
     <dt><code class="parameter">whence</code></dt>
     <dd>
      <p class="para">
       Possible values:
       <ul class="simplelist">
        <li><strong><code><a href="filesystem.constants.php#constant.seek-set">SEEK_SET</a></code></strong> - Set position equal to <code class="parameter">offset</code> bytes.</li>
        <li><strong><code><a href="filesystem.constants.php#constant.seek-cur">SEEK_CUR</a></code></strong> - Set position to current location plus <code class="parameter">offset</code>.</li>
        <li><strong><code><a href="filesystem.constants.php#constant.seek-end">SEEK_END</a></code></strong> - Set position to end-of-file plus <code class="parameter">offset</code>.</li>
       </ul>
      </p>
      <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
       <span class="simpara">
        The current implementation never sets <code class="parameter">whence</code> to
        <strong><code><a href="filesystem.constants.php#constant.seek-cur">SEEK_CUR</a></code></strong>; instead such seeks are internally converted
        to <strong><code><a href="filesystem.constants.php#constant.seek-set">SEEK_SET</a></code></strong> seeks.
       </span>
      </p></blockquote>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-streamwrapper.stream-seek-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Return <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if the position was updated, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> otherwise.
  </p>
 </div>




 <div class="refsect1 notes" id="refsect1-streamwrapper.stream-seek-notes">
  <h3 class="title">Anmerkungen</h3>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
   <p class="para">
    If not implemented, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> is assumed as the return value.
   </p>
  </p></blockquote>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
   <p class="para">
    Upon success, 
    <span class="methodname"><a href="streamwrapper.stream-tell.php" class="methodname">streamWrapper::stream_tell()</a></span> is called directly after
    calling <span class="methodname"><strong>streamWrapper::stream_seek()</strong></span>. If
    <span class="methodname"><a href="streamwrapper.stream-tell.php" class="methodname">streamWrapper::stream_tell()</a></span> fails, the return
    value to the caller function will be set to <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
   </p>
  </p></blockquote>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
   <p class="para">
    Not all seeks operations on the stream will result in this function being
    called. PHP streams have read buffering enabled by default (see also
    <span class="function"><a href="function.stream-set-read-buffer.php" class="function">stream_set_read_buffer()</a></span>) and seeking may be done by
    merely moving the buffer pointer.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-streamwrapper.stream-seek-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.fseek.php" class="function" rel="rdfs-seeAlso">fseek()</a> - Positioniert den Dateizeiger</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>