mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-24 08:52:09 +01:00
190 lines
4.7 KiB
XML
190 lines
4.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 9ec46b8b8aa9ed5a6798996e742c0fe8a7820da8 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
|
|
<refentry xml:id="evstat.attr" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>EvStat::attr</refname>
|
|
<refpurpose>Retourne la valeur la plus récente détectée par Ev</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier>
|
|
<type>array</type>
|
|
<methodname>EvStat::attr</methodname>
|
|
<void />
|
|
</methodsynopsis>
|
|
<para>
|
|
Retourne un tableau des valeurs les plus récentes détectées par Ev.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
&no.function.parameters;
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Retourne un tableau des valeurs les plus récentes détectées par Ev
|
|
(sans le <literal>stat</literal> courant) :
|
|
<table>
|
|
<title>Liste des clés du tableaux retournés par la méthode <methodname>EvStat::attr</methodname></title>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>Clé</entry>
|
|
<entry>Description</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>
|
|
<constant>'dev'</constant>
|
|
</entry>
|
|
<entry>ID du périphérique contenant le fichier</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'ino'</constant>
|
|
</entry>
|
|
<entry>nombre d'inodes</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'mode'</constant>
|
|
</entry>
|
|
<entry>protection</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'nlink'</constant>
|
|
</entry>
|
|
<entry>nombre de liens durs</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'uid'</constant>
|
|
</entry>
|
|
<entry>ID de l'utilisateur du propriétaire</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'size'</constant>
|
|
</entry>
|
|
<entry>taille totale, en octets</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'gid'</constant>
|
|
</entry>
|
|
<entry>ID du groupe du propriétaire</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'rdev'</constant>
|
|
</entry>
|
|
<entry>ID du périphérique (si fichier spécifial)</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'blksize'</constant>
|
|
</entry>
|
|
<entry>taille du bloc pour un système de fichiers I/O</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'blocks'</constant>
|
|
</entry>
|
|
<entry>nombre de blocs 512B alloués</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'atime'</constant>
|
|
</entry>
|
|
<entry>Date/heure du dernier accès</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'ctime'</constant>
|
|
</entry>
|
|
<entry>Date/Heure de la dernière modification de statut</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'mtime'</constant>
|
|
</entry>
|
|
<entry>Date/heure de la dernière modification</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
<para>
|
|
Voir la page du manuel sur <literal>stat(2)</literal>
|
|
pour plus de détails.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title>Surveillance des modifications dans /var/log/messages</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// Utilisation d'un intervalle de 10 secondes.
|
|
$w = new EvStat("/var/log/messages", 8, function ($w) {
|
|
echo "/var/log/messages changed\n";
|
|
|
|
$attr = $w->attr();
|
|
|
|
if ($attr['nlink']) {
|
|
printf("Current size: %ld\n", $attr['size']);
|
|
printf("Current atime: %ld\n", $attr['atime']);
|
|
printf("Current mtime: %ld\n", $attr['mtime']);
|
|
} else {
|
|
fprintf(STDERR, "`messages` file is not there!");
|
|
$w->stop();
|
|
}
|
|
});
|
|
|
|
Ev::run();
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</refsect1>
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<simplelist>
|
|
<member>
|
|
<methodname>EvStat::prev</methodname>
|
|
</member>
|
|
<member>
|
|
<methodname>EvStat::stat</methodname>
|
|
</member>
|
|
</simplelist>
|
|
</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
|
|
-->
|