<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.filesystem.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.ftruncate.php',
    1 => 'ftruncate',
    2 => 'Tronca un file alla lunghezza data',
  ),
  'up' => 
  array (
    0 => 'ref.filesystem.php',
    1 => 'Filesystem Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.ftell.php',
    1 => 'ftell',
  ),
  'next' => 
  array (
    0 => 'function.fwrite.php',
    1 => 'fwrite',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'it',
    'path' => 'reference/filesystem/functions/ftruncate.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.ftruncate" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">ftruncate</h1>
    <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ftruncate</span> &mdash; <span class="dc-title">Tronca un file alla lunghezza data</span></p>

   </div>
   <div class="refsect1 unknown-613" id="refsect1-function.ftruncate-unknown-613">
    <h3 class="title">Descrizione</h3>
     <div class="methodsynopsis dc-description">
      <span class="methodname"><strong>ftruncate</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$handle</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$size</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

    <p class="para rdfs-comment">
     Prende il puntatore al file <code class="parameter">handle</code> e tronca il file 
     alla lunghezza indicata da <code class="parameter">size</code>.
     Restituisce <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> in caso di successo, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> in caso di fallimento.
    </p>
     <blockquote class="note"><p><strong class="note">Nota</strong>:  
     <p class="para"> 
      Nelle versioni di PHP precedenti alla 4.3.3, la funzione <span class="function"><strong>ftruncate()</strong></span>
      restituisce un <span class="type"><a href="language.types.integer.php" class="type integer">integer</a></span> di valore 1 se l&#039;operazione riesce, anziché
      restituire <span class="type"><a href="language.types.boolean.php" class="type boolean">boolean</a></span> <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>. 
     </p> 
    </p></blockquote> 
    <p class="para"> 
     See also <span class="function"><a href="function.fopen.php" class="function">fopen()</a></span> and 
     <span class="function"><a href="function.fseek.php" class="function">fseek()</a></span>. 
    </p>
   </div>

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