<?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.fstat.php',
    1 => 'fstat',
    2 => 'Restituisce le informazioni riguardanti un file attraverso un puntatore al file aperto',
  ),
  'up' => 
  array (
    0 => 'ref.filesystem.php',
    1 => 'Filesystem Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.fseek.php',
    1 => 'fseek',
  ),
  'next' => 
  array (
    0 => 'function.fsync.php',
    1 => 'fsync',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'it',
    'path' => 'reference/filesystem/functions/fstat.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.fstat" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">fstat</h1>
    <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">fstat</span> &mdash; <span class="dc-title">Restituisce le informazioni riguardanti un file attraverso un puntatore al file aperto</span></p>

   </div>
   <div class="refsect1 unknown-607" id="refsect1-function.fstat-unknown-607">
    <h3 class="title">Descrizione</h3>
     <div class="methodsynopsis dc-description">
      <span class="methodname"><strong>fstat</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="type"><a href="language.types.array.php" class="type array">array</a></span></div>

    <p class="para rdfs-comment">
     Restituisce le statistiche del file aperto dal puntatore <code class="parameter">handle</code>.
     Questa funzione è simile a 
     <span class="function"><a href="function.stat.php" class="function">stat()</a></span> eccetto per il fatto che opera
     su un puntatore a file aperto invece che su un nome di file.
    </p>
    <p class="para">
     Restituisce un vettore con le statistiche del file con il formato 
     del vettore è descritto nella pagina di <span class="function"><a href="function.stat.php" class="function">stat()</a></span>.     
    </p>
    <p class="para">
     <div class="example" id="example-1">
     <p><strong>Example #1 Esempio di uso di <span class="function"><strong>fstat()</strong></span></strong></p>
      <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">// apertura del file<br /></span><span style="color: #0000BB">$fp </span><span style="color: #007700">= </span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #DD0000">"/etc/passwd"</span><span style="color: #007700">, </span><span style="color: #DD0000">"r"</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// raccolta delle informazioni<br /></span><span style="color: #0000BB">$fstat </span><span style="color: #007700">= </span><span style="color: #0000BB">fstat</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// chiusura del file<br /></span><span style="color: #0000BB">fclose</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// scrittura della sola parte associativa<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">array_slice</span><span style="color: #007700">(</span><span style="color: #0000BB">$fstat</span><span style="color: #007700">, </span><span style="color: #0000BB">13</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
      </div>

      <div class="example-contents"><p>
       l&#039;esempio visualizzerà :
      </p></div>
      <div class="example-contents screen">
<div class="cdata"><pre>
Array
(
    [dev] =&gt; 771
    [ino] =&gt; 488704
    [mode] =&gt; 33188
    [nlink] =&gt; 1
    [uid] =&gt; 0
    [gid] =&gt; 0
    [rdev] =&gt; 0
    [size] =&gt; 1114
    [atime] =&gt; 1061067181
    [mtime] =&gt; 1056136526
    [ctime] =&gt; 1056136526
    [blksize] =&gt; 4096
    [blocks] =&gt; 8
)
</pre></div>
      </div>
     </div>
    </p>

    <blockquote class="note"><p><strong class="note">Nota</strong>: <span class="simpara">I risultati di questa funzione 
saranno memorizzati. Vedere <span class="function"><a href="function.clearstatcache.php" class="function">clearstatcache()</a></span> per  
maggiori dettagli.</span></p></blockquote>

    <blockquote class="note"><p><strong class="note">Nota</strong>: <span class="simpara">Questa funzione non opererà su
<a href="features.remote-files.php" class="link">file remoti</a> perché il file che
deve essere esaminato deve essere accessibile attraverso il filesysmte del server.</span></p></blockquote>

   </div>

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