<?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.stat.php',
    1 => 'stat',
    2 => 'Da informazioni su un file',
  ),
  'up' => 
  array (
    0 => 'ref.filesystem.php',
    1 => 'Filesystem Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.set-file-buffer.php',
    1 => 'set_file_buffer',
  ),
  'next' => 
  array (
    0 => 'function.symlink.php',
    1 => 'symlink',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'it',
    'path' => 'reference/filesystem/functions/stat.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.stat" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">stat</h1>
    <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">stat</span> &mdash; <span class="dc-title">Da informazioni su un file</span></p>

   </div>
   <div class="refsect1 unknown-664" id="refsect1-function.stat-unknown-664">
    <h3 class="title">Descrizione</h3>
     <div class="methodsynopsis dc-description">
      <span class="methodname"><strong>stat</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$filename</code></span>): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

    <p class="para rdfs-comment">
     Restituisce una serie di informazioni a riguardo del file <code class="parameter">filename</code>.
     Se il parametro <code class="parameter">filename</code> è un link simbolico, le informazioni riguardano il file stesso,
     e non il file puntato dal link. La funzione <span class="function"><a href="function.lstat.php" class="function">lstat()</a></span> è identica a<span class="function"><strong>
     stat()</strong></span> tranne che dovrebbe restituire il file puntato dal link.
    </p>
    <p class="para">
     In caso di errore <span class="function"><strong>stat()</strong></span> restituisce <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>. Inoltre
     genera un warning.
    </p>
    <p class="para">
    La funzione restituisce un vettore con le informazioni sul file contenente i
     seguenti elementi. Il vettore parte dall&#039;indice zero. Oltre agli indici numerici
     il vettore contiene indici
     associativi, come sarà indicato per ciascun parametro; questo è disponibile
     dal PHP versione 4.0.6.
    </p>
    <p class="para">
     <table class="doctable table">
      <caption><strong>Formato del vettore restituito da <span class="function"><strong>stat()</strong></span>
       e <span class="function"><a href="function.fstat.php" class="function">fstat()</a></span></strong></caption>
      
       <thead>
        <tr>
         <th>Indice numerico</th>
         <th>Associativo (da PHP 4.0.6)</th>
         <th>Descrizione</th>
        </tr>

       </thead>

       <tbody class="tbody">
        <tr>
         <td>0</td>
         <td>dev</td>
         <td>device</td>
        </tr>

        <tr>
         <td>1</td>
         <td>ino</td>
         <td>inode</td>
        </tr>

        <tr>
         <td>2</td>
         <td>mode</td>
         <td>modalità di protezione dell&#039;inode</td>
        </tr>

        <tr>
         <td>3</td>
         <td>nlink</td>
         <td>numero di link</td>
        </tr>

        <tr>
         <td>4</td>
         <td>uid</td>
         <td>ID utente del proprietario</td>
        </tr>

        <tr>
         <td>5</td>
         <td>gid</td>
         <td>ID del gruppo del proprietario</td>
        </tr>

        <tr>
         <td>6</td>
         <td>rdev</td>
         <td>tipo di device con l&#039;inode device *</td>
        </tr>

        <tr>
         <td>7</td>
         <td>size</td>
         <td>dimensione in byte</td>
        </tr>

        <tr>
         <td>8</td>
         <td>atime</td>
         <td>ora dell&#039;ultimo accesso (Unix timestamp)</td>
        </tr>

        <tr>
         <td>9</td>
         <td>mtime</td>
         <td>ora del&#039;ultima modifica (Unix timestamp)</td>
        </tr>

        <tr>
         <td>10</td>
         <td>ctime</td>
         <td>ora dell&#039;ultimo cambiamento di inode(Unix timestamp)</td>
        </tr>

        <tr>
         <td>11</td>
         <td>blksize</td>
         <td>dimensione del blocco per l&#039;I/O di filesystem *</td>
        </tr>

        <tr>
         <td>12</td>
         <td>blocks</td>
         <td>numero dei blocchi allocati</td>
        </tr>


       </tbody>
      
     </table>

     * - valida solo su sistemi che supportano il tipo st_blksize--altri sistemi
     (ad esempio Windows) restituiscono -1.

    <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>

    <div class="tip"><strong class="tip">Suggerimento</strong><p class="simpara">A partire da <code class="literal">PHP 5.0.0</code>, questa funzione può essere utilizzata con
<em>alcuni</em> URL wrappers.  Fare riferimento a 
<a href="wrappers.php" class="xref">Supported Protocols and Wrappers</a> per la lista di quali wrappers supportano le funzioni della famiglia
<span class="function"><strong>stat()</strong></span>.</p></div>
    </p>
    <p class="para">
     Vedere anche <span class="function"><a href="function.lstat.php" class="function">lstat()</a></span>,
     <span class="function"><a href="function.fstat.php" class="function">fstat()</a></span>,
     <span class="function"><a href="function.filemtime.php" class="function">filemtime()</a></span> e
     <span class="function"><a href="function.filegroup.php" class="function">filegroup()</a></span>.
    </p>
   </div>

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