<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.dio.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.dio-truncate.php',
    1 => 'dio_truncate',
    2 => 'Truncates file descriptor fd to offset bytes',
  ),
  'up' => 
  array (
    0 => 'ref.dio.php',
    1 => 'Функції Direct IO',
  ),
  'prev' => 
  array (
    0 => 'function.dio-tcsetattr.php',
    1 => 'dio_tcsetattr',
  ),
  'next' => 
  array (
    0 => 'function.dio-write.php',
    1 => 'dio_write',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/dio/functions/dio-truncate.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.dio-truncate" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">dio_truncate</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5 &lt; 5.1.0)</p><p class="refpurpose"><span class="refname">dio_truncate</span> &mdash; <span class="dc-title">
   Truncates file descriptor fd to offset bytes 
  </span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.dio-truncate-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>dio_truncate</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$fd</code></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="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>dio_truncate()</strong></span> truncates a file to at most 
   <code class="parameter">offset</code> bytes in size.
  </p>
  <p class="para">
   If the file previously was larger than this size, the extra data is 
   lost. If the file previously was shorter, it is unspecified whether the
   file is left unchanged or is extended. In the latter case the extended 
   part reads as zero bytes.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.dio-truncate-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">fd</code></dt>
     <dd>
      <p class="para">
       The file descriptor returned by <span class="function"><a href="function.dio-open.php" class="function">dio_open()</a></span>.
      </p>
     </dd>
    
    
     <dt><code class="parameter">offset</code></dt>
     <dd>
      <p class="para">
       The offset in bytes.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.dio-truncate-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Повертає <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> у разі успіху або <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> в разі помилки.
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.dio-truncate-notes">
  <h3 class="title">Примітки</h3>
  <blockquote class="note"><p><strong class="note">Зауваження</strong>: <span class="simpara">Для Windows-платформ ця
функція нереалізована.</span></p></blockquote>
 </div>

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