mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-27 14:28:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@328911 c90b9560-bf6c-de11-be94-00142212c4b1
190 lines
4.3 KiB
XML
190 lines
4.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<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>Returns the values most recently detected by Ev</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier>
|
|
<type>array</type>
|
|
<methodname>EvStat::attr</methodname>
|
|
<void />
|
|
</methodsynopsis>
|
|
<para>
|
|
Returns array of the values most recently detected by Ev
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
&no.function.parameters;
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Returns array with the values most recently detect by Ev(without actual
|
|
<literal>stat</literal>
|
|
'ing):
|
|
<table>
|
|
<title>
|
|
List for item keys of the array returned by <methodname>EvStat::attr</methodname>
|
|
</title>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>Key</entry>
|
|
<entry>Description</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>
|
|
<constant>'dev'</constant>
|
|
</entry>
|
|
<entry>ID of device containing file</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'ino'</constant>
|
|
</entry>
|
|
<entry>inode number</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'mode'</constant>
|
|
</entry>
|
|
<entry>protection</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'nlink'</constant>
|
|
</entry>
|
|
<entry>number of hard links</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'uid'</constant>
|
|
</entry>
|
|
<entry>user ID of owner</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'size'</constant>
|
|
</entry>
|
|
<entry>total size, in bytes</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'gid'</constant>
|
|
</entry>
|
|
<entry>group ID of owner</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'rdev'</constant>
|
|
</entry>
|
|
<entry>device ID (if special file)</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'blksize'</constant>
|
|
</entry>
|
|
<entry>blocksize for file system I/O</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'blocks'</constant>
|
|
</entry>
|
|
<entry>number of 512B blocks allocated</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'atime'</constant>
|
|
</entry>
|
|
<entry>time of last access</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'ctime'</constant>
|
|
</entry>
|
|
<entry>time of last status change</entry>
|
|
</row>
|
|
<row>
|
|
<entry>
|
|
<constant>'mtime'</constant>
|
|
</entry>
|
|
<entry>time of last modification</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
<para>
|
|
See
|
|
<literal>stat(2)</literal>
|
|
man page for details.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title>Monitor changes of /var/log/messages</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// Use 10 second update interval.
|
|
$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
|
|
-->
|