mirror of
https://github.com/php/doc-it.git
synced 2026-03-25 16:12:17 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/it/trunk@314543 c90b9560-bf6c-de11-be94-00142212c4b1
100 lines
2.4 KiB
XML
100 lines
2.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 -->
|
|
<!-- EN-Revision: n/a Maintainer: cortesi Status: working -->
|
|
<refentry xml:id="function.fstat" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>fstat</refname>
|
|
<refpurpose>Restituisce le informazioni riguardanti un file attraverso un puntatore al file aperto</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Descrizione</title>
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>fstat</methodname>
|
|
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Restituisce le statistiche del file aperto dal puntatore <parameter>handle</parameter>.
|
|
Questa funzione è simile a
|
|
<function>stat</function> eccetto per il fatto che opera
|
|
su un puntatore a file aperto invece che su un nome di file.
|
|
</para>
|
|
<para>
|
|
Restituisce un vettore con le statistiche del file con il formato
|
|
del vettore è descritto nella pagina di <function>stat</function>.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Esempio di uso di <function>fstat</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
// apertura del file
|
|
$fp = fopen("/etc/passwd", "r");
|
|
|
|
// raccolta delle informazioni
|
|
$fstat = fstat($fp);
|
|
|
|
// chiusura del file
|
|
fclose($fp);
|
|
|
|
// scrittura della sola parte associativa
|
|
print_r(array_slice($fstat, 13));
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
l'esempio visualizzerà :
|
|
</para>
|
|
<screen>
|
|
<![CDATA[
|
|
Array
|
|
(
|
|
[dev] => 771
|
|
[ino] => 488704
|
|
[mode] => 33188
|
|
[nlink] => 1
|
|
[uid] => 0
|
|
[gid] => 0
|
|
[rdev] => 0
|
|
[size] => 1114
|
|
[atime] => 1061067181
|
|
[mtime] => 1056136526
|
|
[ctime] => 1056136526
|
|
[blksize] => 4096
|
|
[blocks] => 8
|
|
)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
|
|
¬e.clearstatcache;
|
|
|
|
¬e.no-remote;
|
|
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|