<?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 => 'en',
  ),
  'this' => 
  array (
    0 => 'streamwrapper.stream-truncate.php',
    1 => 'streamWrapper::stream_truncate',
    2 => 'Truncate stream',
  ),
  'up' => 
  array (
    0 => 'class.streamwrapper.php',
    1 => 'streamWrapper',
  ),
  'prev' => 
  array (
    0 => 'streamwrapper.stream-tell.php',
    1 => 'streamWrapper::stream_tell',
  ),
  'next' => 
  array (
    0 => 'streamwrapper.stream-write.php',
    1 => 'streamWrapper::stream_write',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/stream/streamwrapper/stream-truncate.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="streamwrapper.stream-truncate" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">streamWrapper::stream_truncate</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.4.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">streamWrapper::stream_truncate</span> &mdash; <span class="dc-title">Truncate stream</span></p>

 </div>

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

  <p class="para rdfs-comment">
   Will respond to truncation, e.g., through <span class="function"><a href="function.ftruncate.php" class="function">ftruncate()</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-streamwrapper.stream-truncate-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">new_size</code></dt>
     <dd>
      <p class="para">
       The new size.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-streamwrapper.stream-truncate-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> on success or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> on failure.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-streamwrapper.stream-truncate-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.ftruncate.php" class="function" rel="rdfs-seeAlso">ftruncate()</a> - Truncates a file to a given length</span></li>
   </ul>
  </p>
 </div>


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