mirror of
https://github.com/php/doc-it.git
synced 2026-03-26 00:22:14 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/it/trunk@314543 c90b9560-bf6c-de11-be94-00142212c4b1
86 lines
3.3 KiB
XML
86 lines
3.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- EN-Revision: n/a Maintainer: cortesi Status: working -->
|
|
<refentry xml:id="function.clearstatcache" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>clearstatcache</refname>
|
|
<refpurpose>Libera la cache dello stato di un file</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Descrizione</title>
|
|
<methodsynopsis>
|
|
<type>void</type><methodname>clearstatcache</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
Quando si eseguono le funzioni di sistema <systemitem>stat</systemitem> o
|
|
<systemitem>lstat</systemitem> o una delle funzioni elencate nella
|
|
lista delle funzioni coinvolte (vedi sotto), il PHP memorizza le informazioni restituite
|
|
da queste funzioni in modo da fornire migliori performance. Esistono, tuttavia,
|
|
casi in cui si desidera rimuovere le informazioni memorizzate. Ad esempio,
|
|
nel caso in cui un file venga controllato più volte nel medesimo script ed il file si trova in situazioni
|
|
in cui possa venire rimosso o possa essere variato durante l'esecuzione dello script; in questi casi
|
|
si può volere cancellare le informazioni memorizzate. Per queste situazioni si può utilizzare la funzione
|
|
<function>clearstatcache</function> che cancella le informazioni memorizzate dal PHP sullo
|
|
stato di un file.
|
|
</para>
|
|
<para>
|
|
Occorre notare che il PHP non memorizza informazioni su file inesistenti.
|
|
Pertanto se si esegue la funzione <function>file_exists</function> su un file
|
|
che non esiste, questa restituisce &false; fino a quando il file non viene creato.
|
|
Un volta ccreato il file, la funzione restituisce &true; anche se il file viene cancellato.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Queste funzioni memorizzano informazioni su specifici file, pertanto basta
|
|
eseguire <function>clearstatcache</function> nel caso di molteplici operazioni
|
|
sul medesimo file oppure nel caso sia necessario non memorizzare informazioni
|
|
su un dato file.
|
|
</para>
|
|
</note>
|
|
<para>
|
|
Tale valore viene memorizzato solo per la durata di una singola richiesta.
|
|
</para>
|
|
<para>
|
|
Le funzioni coinvolte sono <function>stat</function>,
|
|
<function>lstat</function>,
|
|
<function>file_exists</function>,
|
|
<function>is_writable</function>,
|
|
<function>is_readable</function>,
|
|
<function>is_executable</function>,
|
|
<function>is_file</function>,
|
|
<function>is_dir</function>,
|
|
<function>is_link</function>,
|
|
<function>filectime</function>,
|
|
<function>fileatime</function>,
|
|
<function>filemtime</function>,
|
|
<function>fileinode</function>,
|
|
<function>filegroup</function>,
|
|
<function>fileowner</function>,
|
|
<function>filesize</function>,
|
|
<function>filetype</function> e
|
|
<function>fileperms</function>.
|
|
</para>
|
|
</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
|
|
-->
|