cvs: phpdoc / manual.xml.in /en language-snippets.ent /en/reference/inotify .cvsignore book.xml constants.xml reference.xml setup.xml
/en/reference/inotify/functions inotify-add-watch.xml inotify-init.xml inotify-queue-len.xml inotify-read.xml inotify-rm-watch.xml
| From: | Arnaud Le Blanc | Date: | Fri, 24 Oct 2008 23:11:12 +0000 |
| Subject: | cvs: phpdoc / manual.xml.in /en language-snippets.ent /en/reference/inotify .cvsignore book.xml constants.xml reference.xml setup.xml /en/reference/inotify/functions inotify-add-watch.xml inotify-init.xml inotify-queue-len.xml inotify-read.xml inotify-rm-watch.xml |
||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-2285@lists.php.net to get a copy of this message | ||
lbarnaud Fri Oct 24 23:11:12 2008 UTC
Added files:
/phpdoc/en/reference/inotify .cvsignore book.xml constants.xml
reference.xml setup.xml
/phpdoc/en/reference/inotify/functions inotify-add-watch.xml
inotify-init.xml
inotify-queue-len.xml
inotify-read.xml
inotify-rm-watch.xml
Modified files:
/phpdoc manual.xml.in
/phpdoc/en language-snippets.ent
Log:
Added doc for inotify extension
http://cvs.php.net/viewvc.cgi/phpdoc/manual.xml.in?r1=1.261&r2=1.262&diff_format=u Index: phpdoc/manual.xml.in diff -u phpdoc/manual.xml.in:1.261 phpdoc/manual.xml.in:1.262 --- phpdoc/manual.xml.in:1.261 Fri Jul 25 11:47:39 2008 +++ phpdoc/manual.xml.in Fri Oct 24 23:11:12 2008 @@ -2,7 +2,7 @@ <!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook XML V5.0//EN" "./docbook/docbook-xml/docbook.dtd" [ -<!-- $Revision: 1.261 $ --> +<!-- $Revision: 1.262 $ --> <!-- We use xhtml entities all over the place --> <!ENTITY % xhtml-lat1 SYSTEM "./entities/ISO/xhtml1-lat1.ent"> <!ENTITY % xhtml-symbol SYSTEM "./entities/ISO/xhtml1-symbol.ent"> @@ -254,6 +254,7 @@ &reference.dir.book; &reference.fileinfo.book; &reference.filesystem.book; + &reference.inotify.book; &reference.mime-magic.book; &reference.xattr.book; &reference.xdiff.book; http://cvs.php.net/viewvc.cgi/phpdoc/en/language-snippets.ent?r1=1.231&r2=1.232&diff_format=u Index: phpdoc/en/language-snippets.ent diff -u phpdoc/en/language-snippets.ent:1.231 phpdoc/en/language-snippets.ent:1.232 --- phpdoc/en/language-snippets.ent:1.231 Sun Aug 24 21:02:32 2008 +++ phpdoc/en/language-snippets.ent Fri Oct 24 23:11:12 2008 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.231 $ --> +<!-- $Revision: 1.232 $ --> <!-- Keep 'em sorted --> @@ -960,3 +960,7 @@ <!-- XMLReader --> <!ENTITY xmlreader.libxml20620.note '<caution><para>This function is only available when PHP is compiled against libxml 20620 or later.</para></caution>'> +<!-- inotify --> +<!ENTITY inotify.instance.description 'Resource returned by +<function>inotify_init</function>'> + http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/.cvsignore?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/.cvsignore +++ phpdoc/en/reference/inotify/.cvsignore entities.*.xml *.php http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/book.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/book.xml +++ phpdoc/en/reference/inotify/book.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- Purpose: basic.php --> <!-- Membership: pecl --> <book xml:id="book.inotify" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Inotify</title> <!-- {{{ preface --> <preface xml:id="intro.inotify"> &reftitle.intro; <para> The inotify extension exposes the inotify functions <function>inotify_init</function>, <function>inotify_add_watch</function> and <function>inotify_rm_watch</function>. </para> <para> As the C <function>inotify_init</function> function returns a file descriptor, PHP's <function>inotify_init</function> returns a stream resource, usable with standard stream functions, like <function>stream_select</function>, <function>stream_set_blocking</function> and <function>fclose</function>. <function>inotify_read</function> replaces the C way of reading inotify events. </para> </preface> <!-- }}} --> &reference.inotify.setup; &reference.inotify.constants; &reference.inotify.reference; </book> <!-- 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:"../../../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 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/constants.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/constants.xml +++ phpdoc/en/reference/inotify/constants.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <appendix xml:id="inotify.constants" xmlns="http://docbook.org/ns/docbook"> &reftitle.constants; &extension.constants; <variablelist xml:id="inotify.constants.events"> <title>Inotify constants usable with <function>inotify_add_watch</function> and/or returned by <function>inotify_read</function></title> <varlistentry> <term> <constant>IN_ACCESS</constant> (<type>integer</type>) </term> <listitem> <simpara> File was accessed (read) (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_MODIFY</constant> (<type>integer</type>) </term> <listitem> <simpara> File was modified (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_ATTRIB</constant> (<type>integer</type>) </term> <listitem> <simpara> Metadata changed (e.g. permissions, mtime, etc.) (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_CLOSE_WRITE</constant> (<type>integer</type>) </term> <listitem> <simpara> File opened for writing was closed (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_CLOSE_NOWRITE</constant> (<type>integer</type>) </term> <listitem> <simpara> File not opened for writing was closed (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_OPEN</constant> (<type>integer</type>) </term> <listitem> <simpara> File was opened (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_MOVED_TO</constant> (<type>integer</type>) </term> <listitem> <simpara> File moved into watched directory (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_MOVED_FROM</constant> (<type>integer</type>) </term> <listitem> <simpara> File moved out of watched directory (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_CREATE</constant> (<type>integer</type>) </term> <listitem> <simpara> File or directory created in watched directory (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_DELETE</constant> (<type>integer</type>) </term> <listitem> <simpara> File or directory deleted in watched directory (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_DELETE_SELF</constant> (<type>integer</type>) </term> <listitem> <simpara> Watched file or directory was deleted </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_MOVE_SELF</constant> (<type>integer</type>) </term> <listitem> <simpara> Watch file or directory was moved </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_CLOSE</constant> (<type>integer</type>) </term> <listitem> <simpara> Equals to IN_CLOSE_WRITE | IN_CLOSE_NOWRITE </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_MOVE</constant> (<type>integer</type>) </term> <listitem> <simpara> Equals to IN_MOVED_FROM | IN_MOVED_TO </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_ALL_EVENTS</constant> (<type>integer</type>) </term> <listitem> <simpara> Bitmask of all the above constants </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_UNMOUNT</constant> (<type>integer</type>) </term> <listitem> <simpara> File system containing watched object was unmounted </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_Q_OVERFLOW</constant> (<type>integer</type>) </term> <listitem> <simpara> Event queue overflowed (wd is -1 for this event) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_IGNORED</constant> (<type>integer</type>) </term> <listitem> <simpara> Watch was removed (explicitly by <function>inotify_rm_watch</function> or because file was removed or filesystem unmounted </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_ISDIR</constant> (<type>integer</type>) </term> <listitem> <simpara> Subject of this event is a directory </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_ONLYDIR</constant> (<type>integer</type>) </term> <listitem> <simpara> Only watch pathname if it is a directory (Since Linux 2.6.15) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_DONT_FOLLOW</constant> (<type>integer</type>) </term> <listitem> <simpara> Do not dereference pathname if it is a symlink (Since Linux 2.6.15) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_MASK_ADD</constant> (<type>integer</type>) </term> <listitem> <simpara> Add events to watch mask for this pathname if it already exists (instead of replacing mask). </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_ONESHOT</constant> (<type>integer</type>) </term> <listitem> <simpara> Monitor pathname for one event, then remove from watch list. </simpara> </listitem> </varlistentry> </variablelist> <note> <simpara> The events marked with an asterisk (*) above can occur for files in watched directories. </simpara> </note> </appendix> <!-- 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:"../../../../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 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/reference.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/reference.xml +++ phpdoc/en/reference/inotify/reference.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <reference xml:id="ref.inotify" xmlns="http://docbook.org/ns/docbook"> <title>Inotify &Functions;</title> &reference.inotify.entities.functions; </reference> <!-- 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:"../../../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 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/setup.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/setup.xml +++ phpdoc/en/reference/inotify/setup.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <chapter xml:id="inotify.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.setup; <!-- {{{ Requirements --> <section xml:id="inotify.requirements"> &reftitle.required; <para> This extension requires Linux 2.6.13 or newer, and a recent libC. </para> </section> <!-- }}} --> <!-- {{{ Installation --> <section xml:id="inotify.install"> &reftitle.setup; <para> &pecl.moved; </para> <para> &pecl.info; <link xlink:href="&url.pecl.package;inotify">&url.pecl.package;inotify</link>. </para> </section> <!-- }}} --> <!-- {{{ Configuration --> <section xml:id="inotify.configuration"> &reftitle.runtime; &no.config; </section> <!-- }}} --> <!-- {{{ Resources --> <section xml:id="inotify.resources"> &reftitle.resources; <para> This extension defines a stream resource returned by <function>inotify_init</function>. </para> </section> <!-- }}} --> </chapter> <!-- 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:"../../../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 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/functions/inotify-add-watch.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/functions/inotify-add-watch.xml +++ phpdoc/en/reference/inotify/functions/inotify-add-watch.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <refentry xml:id="function.inotify-add-watch" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>inotify_add_watch</refname> <refpurpose>Add a watch to an initialized inotify instance</refpurpose> </refnamediv> <refsect1 role="description"><!-- {{{ --> &reftitle.description; <methodsynopsis> <type>integer</type><methodname>inotify_add_watch</methodname> <methodparam><type>resource</type><parameter>inotify_instance</parameter></methodparam> <methodparam><type>string</type><parameter>pathname</parameter></methodparam> <methodparam><type>integer</type><parameter>mask</parameter></methodparam> </methodsynopsis> <para> <function>inotify_add_watch</function> adds a new watch or modify an existing watch for the file or directory specified in <parameter>pathname</parameter>. </para> <para> Using <function>inotify_add_watch</function> on a watched object replaces the existing watch. Using the <constant>IN_MASK_ADD</constant> constant adds (OR) events to the existing watch. </para> </refsect1><!-- }}} --> <refsect1 role="parameters"><!-- {{{ --> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>inotify_instance</parameter></term> <listitem> <para> &inotify.instance.description; </para> </listitem> </varlistentry> <varlistentry> <term><parameter>pathname</parameter></term> <listitem> <para> File or directory to watch </para> </listitem> </varlistentry> <varlistentry> <term><parameter>mask</parameter></term> <listitem> <para> Events to watch for. See <link linkend="inotify.constants">&ReservedConstants;</link>. </para> </listitem> </varlistentry> </variablelist> </para> </refsect1><!-- }}} --> <refsect1 role="returnvalues"><!-- {{{ --> &reftitle.returnvalues; <para> The return value is a unique (inotify instance wide) watch descriptor. </para> </refsect1><!-- }}} --> <refsect1 role="seealso"><!-- {{{ --> &reftitle.seealso; <para> <simplelist> <member><function>inotify_init</function></member> </simplelist> </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:"../../../../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 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/functions/inotify-init.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/functions/inotify-init.xml +++ phpdoc/en/reference/inotify/functions/inotify-init.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <refentry xml:id="function.inotify-init" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>inotify_init</refname> <refpurpose>Initialize an inotify instance</refpurpose> </refnamediv> <refsect1 role="description"><!-- {{{ --> &reftitle.description; <methodsynopsis> <type>resource</type><methodname>inotify_init</methodname> <void /> </methodsynopsis> <para> Initialize an inotify instance for use with <function>inotify_add_watch</function> </para> </refsect1><!-- }}} --> <refsect1 role="returnvalues"><!-- {{{ --> &reftitle.returnvalues; <para> A stream resource or &false; on error. </para> </refsect1><!-- }}} --> <refsect1 role="examples"><!-- {{{ --> &reftitle.examples; <para> <example xml:id="inotify-init.example.basic"><!-- {{{ --> <programlisting role="php"> <![CDATA[ <?php // Open an inotify instance $fd = inotify_init(); // Watch __FILE__ for metadata changes (e.g. mtime) $watch_descriptor = inotify_add_watch($fd, __FILE__, IN_ATTRIB); // generate an event touch(__FILE__); // Read events $events = inotify_read($fd); print_r($events); // The following methods allows to use inotify functions without blocking on inotify_read(): // - Using stream_select() on $fd: $read = array($fd); $write = null; $except = null; stream_select($read,$write,$except,0); // - Using stream_set_blocking() on $fd stream_set_blocking($fd, 0); inotify_read($fd); // Does no block, and return false if no events are pending // - Using inotify_queue_len() to check if event queue is not empty $queue_len = inotify_queue_len($fd); // If > 0, inotify_read() will not block // Stop watching __FILE__ for metadata changes inotify_rm_watch($fd, $watch_descriptor); // Close the inotify instance // This may have closed all watches if this was not already done fclose($fd); ?> ]]> </programlisting> &example.outputs.similar; <screen> <![CDATA[ array( array( 'wd' => 1, // Equals $watch_descriptor 'mask' => 4, // IN_ATTRIB bit is set 'cookie' => 0, // unique id to connect related events (e.g. // IN_MOVE_FROM and IN_MOVE_TO events) 'name' => '', // the name of a file (e.g. if we monitored changes // in a directory) ), ); ]]> </screen> </example><!-- }}} --> </para> </refsect1><!-- }}} --> <refsect1 role="seealso"><!-- {{{ --> &reftitle.seealso; <para> <simplelist> <member><function>inotify_add_watch</function></member> <member><function>inotify_rm_watch</function></member> <member><function>inotify_queue_len</function></member> <member><function>inotify_read</function></member> <member><function>fclose</function></member> </simplelist> </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:"../../../../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 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/functions/inotify-queue-len.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/functions/inotify-queue-len.xml +++ phpdoc/en/reference/inotify/functions/inotify-queue-len.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <refentry xml:id="function.inotify-queue-len" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>inotify_queue_len</refname> <refpurpose>Return a number upper than zero if there are pending events</refpurpose> </refnamediv> <refsect1 role="description"><!-- {{{ --> &reftitle.description; <methodsynopsis> <type>bool</type><methodname>inotify_queue_len</methodname> <methodparam><type>resource</type><parameter>inotify_instance</parameter></methodparam> </methodsynopsis> <para> This function allows to know if <function>inotify_read</function> will block or not. If a number upper than zero is returned, there are pending events and <function>inotify_read</function> will not block. </para> </refsect1><!-- }}} --> <refsect1 role="parameters"><!-- {{{ --> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>inotify_instance</parameter></term> <listitem> <para> &inotify.instance.description; </para> </listitem> </varlistentry> </variablelist> </para> </refsect1><!-- }}} --> <refsect1 role="returnvalues"><!-- {{{ --> &reftitle.returnvalues; <para> Returns a number upper than zero if there are pending events. </para> </refsect1><!-- }}} --> <refsect1 role="seealso"><!-- {{{ --> &reftitle.seealso; <para> <simplelist> <member><function>inotify_init</function></member> <member><function>stream_select</function></member> <member><function>stream_set_blocking</function></member> </simplelist> </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:"../../../../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 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/functions/inotify-read.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/functions/inotify-read.xml +++ phpdoc/en/reference/inotify/functions/inotify-read.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <refentry xml:id="function.inotify-read" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>inotify_read</refname> <refpurpose>Read events from an inotify instance</refpurpose> </refnamediv> <refsect1 role="description"><!-- {{{ --> &reftitle.description; <methodsynopsis> <type>array</type><methodname>inotify_read</methodname> <methodparam><type>resource</type><parameter>inotify_instance</parameter></methodparam> </methodsynopsis> <para> Read inotify events from an inotify instance. </para> </refsect1><!-- }}} --> <refsect1 role="parameters"><!-- {{{ --> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>inotify_instance</parameter></term> <listitem> <para> &inotify.instance.description; </para> </listitem> </varlistentry> </variablelist> </para> </refsect1><!-- }}} --> <refsect1 role="returnvalues"><!-- {{{ --> &reftitle.returnvalues; <para> An array of inotify events or &false; if no events was pending and <parameter>inotify_instance</parameter> is non-blocking. Each event is an array with the following keys: <simplelist> <member>wd is a watch descriptor returned by <function>inotify_add_watch</function></member> <member>mask is a bit mask of <link linkend="inotify.constants">events</link></member> <member>cookie is a unique id to connect related events (e.g. <constant>IN_MOVE_FROM</constant> and <constant>IN_MOVE_TO</constant>)</member> <member>name is the name of a file (e.g. if a file was modified in a watched directory)</member> </simplelist> </para> </refsect1><!-- }}} --> <refsect1 role="seealso"><!-- {{{ --> &reftitle.seealso; <para> <simplelist> <member><function>inotify_init</function></member> <member><function>stream_select</function></member> <member><function>stream_set_blocking</function></member> <member><function>inotify_queue_len</function></member> </simplelist> </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:"../../../../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 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/functions/inotify-rm-watch.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/functions/inotify-rm-watch.xml +++ phpdoc/en/reference/inotify/functions/inotify-rm-watch.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <refentry xml:id="function.inotify-rm-watch" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>inotify_rm_watch</refname> <refpurpose>Remove an existing watch from an inotify instance</refpurpose> </refnamediv> <refsect1 role="description"><!-- {{{ --> &reftitle.description; <methodsynopsis> <type>bool</type><methodname>inotify_rm_watch</methodname> <methodparam><type>resource</type><parameter>inotify_instance</parameter></methodparam> <methodparam><type>integer</type><parameter>watch_descriptor</parameter></methodparam> </methodsynopsis> <para> <function>inotify_rm_watch</function> removes the watch <parameter>watch_descriptor</parameter> from the inotify instance <parameter>inotify_instance</parameter>. </para> </refsect1><!-- }}} --> <refsect1 role="parameters"><!-- {{{ --> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>inotify_instance</parameter></term> <listitem> <para> &inotify.instance.description; </para> </listitem> </varlistentry> <varlistentry> <term><parameter>watch_descriptor</parameter></term> <listitem> <para> Watch to remove from the instance </para> </listitem> </varlistentry> </variablelist> </para> </refsect1><!-- }}} --> <refsect1 role="returnvalues"><!-- {{{ --> &reftitle.returnvalues; <para> &return.success; </para> </refsect1><!-- }}} --> <refsect1 role="seealso"><!-- {{{ --> &reftitle.seealso; <para> <simplelist> <member><function>inotify_init</function></member> </simplelist> </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:"../../../../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 -->
http://cvs.php.net/viewvc.cgi/phpdoc/manual.xml.in?r1=1.261&r2=1.262&diff_format=u Index: phpdoc/manual.xml.in diff -u phpdoc/manual.xml.in:1.261 phpdoc/manual.xml.in:1.262 --- phpdoc/manual.xml.in:1.261 Fri Jul 25 11:47:39 2008 +++ phpdoc/manual.xml.in Fri Oct 24 23:11:12 2008 @@ -2,7 +2,7 @@ <!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook XML V5.0//EN" "./docbook/docbook-xml/docbook.dtd" [ -<!-- $Revision: 1.261 $ --> +<!-- $Revision: 1.262 $ --> <!-- We use xhtml entities all over the place --> <!ENTITY % xhtml-lat1 SYSTEM "./entities/ISO/xhtml1-lat1.ent"> <!ENTITY % xhtml-symbol SYSTEM "./entities/ISO/xhtml1-symbol.ent"> @@ -254,6 +254,7 @@ &reference.dir.book; &reference.fileinfo.book; &reference.filesystem.book; + &reference.inotify.book; &reference.mime-magic.book; &reference.xattr.book; &reference.xdiff.book; http://cvs.php.net/viewvc.cgi/phpdoc/en/language-snippets.ent?r1=1.231&r2=1.232&diff_format=u Index: phpdoc/en/language-snippets.ent diff -u phpdoc/en/language-snippets.ent:1.231 phpdoc/en/language-snippets.ent:1.232 --- phpdoc/en/language-snippets.ent:1.231 Sun Aug 24 21:02:32 2008 +++ phpdoc/en/language-snippets.ent Fri Oct 24 23:11:12 2008 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.231 $ --> +<!-- $Revision: 1.232 $ --> <!-- Keep 'em sorted --> @@ -960,3 +960,7 @@ <!-- XMLReader --> <!ENTITY xmlreader.libxml20620.note '<caution><para>This function is only available when PHP is compiled against libxml 20620 or later.</para></caution>'> +<!-- inotify --> +<!ENTITY inotify.instance.description 'Resource returned by +<function>inotify_init</function>'> + http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/.cvsignore?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/.cvsignore +++ phpdoc/en/reference/inotify/.cvsignore entities.*.xml *.php http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/book.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/book.xml +++ phpdoc/en/reference/inotify/book.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- Purpose: basic.php --> <!-- Membership: pecl --> <book xml:id="book.inotify" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Inotify</title> <!-- {{{ preface --> <preface xml:id="intro.inotify"> &reftitle.intro; <para> The inotify extension exposes the inotify functions <function>inotify_init</function>, <function>inotify_add_watch</function> and <function>inotify_rm_watch</function>. </para> <para> As the C <function>inotify_init</function> function returns a file descriptor, PHP's <function>inotify_init</function> returns a stream resource, usable with standard stream functions, like <function>stream_select</function>, <function>stream_set_blocking</function> and <function>fclose</function>. <function>inotify_read</function> replaces the C way of reading inotify events. </para> </preface> <!-- }}} --> &reference.inotify.setup; &reference.inotify.constants; &reference.inotify.reference; </book> <!-- 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:"../../../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 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/constants.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/constants.xml +++ phpdoc/en/reference/inotify/constants.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <appendix xml:id="inotify.constants" xmlns="http://docbook.org/ns/docbook"> &reftitle.constants; &extension.constants; <variablelist xml:id="inotify.constants.events"> <title>Inotify constants usable with <function>inotify_add_watch</function> and/or returned by <function>inotify_read</function></title> <varlistentry> <term> <constant>IN_ACCESS</constant> (<type>integer</type>) </term> <listitem> <simpara> File was accessed (read) (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_MODIFY</constant> (<type>integer</type>) </term> <listitem> <simpara> File was modified (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_ATTRIB</constant> (<type>integer</type>) </term> <listitem> <simpara> Metadata changed (e.g. permissions, mtime, etc.) (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_CLOSE_WRITE</constant> (<type>integer</type>) </term> <listitem> <simpara> File opened for writing was closed (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_CLOSE_NOWRITE</constant> (<type>integer</type>) </term> <listitem> <simpara> File not opened for writing was closed (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_OPEN</constant> (<type>integer</type>) </term> <listitem> <simpara> File was opened (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_MOVED_TO</constant> (<type>integer</type>) </term> <listitem> <simpara> File moved into watched directory (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_MOVED_FROM</constant> (<type>integer</type>) </term> <listitem> <simpara> File moved out of watched directory (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_CREATE</constant> (<type>integer</type>) </term> <listitem> <simpara> File or directory created in watched directory (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_DELETE</constant> (<type>integer</type>) </term> <listitem> <simpara> File or directory deleted in watched directory (*) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_DELETE_SELF</constant> (<type>integer</type>) </term> <listitem> <simpara> Watched file or directory was deleted </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_MOVE_SELF</constant> (<type>integer</type>) </term> <listitem> <simpara> Watch file or directory was moved </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_CLOSE</constant> (<type>integer</type>) </term> <listitem> <simpara> Equals to IN_CLOSE_WRITE | IN_CLOSE_NOWRITE </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_MOVE</constant> (<type>integer</type>) </term> <listitem> <simpara> Equals to IN_MOVED_FROM | IN_MOVED_TO </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_ALL_EVENTS</constant> (<type>integer</type>) </term> <listitem> <simpara> Bitmask of all the above constants </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_UNMOUNT</constant> (<type>integer</type>) </term> <listitem> <simpara> File system containing watched object was unmounted </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_Q_OVERFLOW</constant> (<type>integer</type>) </term> <listitem> <simpara> Event queue overflowed (wd is -1 for this event) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_IGNORED</constant> (<type>integer</type>) </term> <listitem> <simpara> Watch was removed (explicitly by <function>inotify_rm_watch</function> or because file was removed or filesystem unmounted </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_ISDIR</constant> (<type>integer</type>) </term> <listitem> <simpara> Subject of this event is a directory </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_ONLYDIR</constant> (<type>integer</type>) </term> <listitem> <simpara> Only watch pathname if it is a directory (Since Linux 2.6.15) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_DONT_FOLLOW</constant> (<type>integer</type>) </term> <listitem> <simpara> Do not dereference pathname if it is a symlink (Since Linux 2.6.15) </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_MASK_ADD</constant> (<type>integer</type>) </term> <listitem> <simpara> Add events to watch mask for this pathname if it already exists (instead of replacing mask). </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>IN_ONESHOT</constant> (<type>integer</type>) </term> <listitem> <simpara> Monitor pathname for one event, then remove from watch list. </simpara> </listitem> </varlistentry> </variablelist> <note> <simpara> The events marked with an asterisk (*) above can occur for files in watched directories. </simpara> </note> </appendix> <!-- 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:"../../../../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 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/reference.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/reference.xml +++ phpdoc/en/reference/inotify/reference.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <reference xml:id="ref.inotify" xmlns="http://docbook.org/ns/docbook"> <title>Inotify &Functions;</title> &reference.inotify.entities.functions; </reference> <!-- 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:"../../../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 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/setup.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/setup.xml +++ phpdoc/en/reference/inotify/setup.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <chapter xml:id="inotify.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.setup; <!-- {{{ Requirements --> <section xml:id="inotify.requirements"> &reftitle.required; <para> This extension requires Linux 2.6.13 or newer, and a recent libC. </para> </section> <!-- }}} --> <!-- {{{ Installation --> <section xml:id="inotify.install"> &reftitle.setup; <para> &pecl.moved; </para> <para> &pecl.info; <link xlink:href="&url.pecl.package;inotify">&url.pecl.package;inotify</link>. </para> </section> <!-- }}} --> <!-- {{{ Configuration --> <section xml:id="inotify.configuration"> &reftitle.runtime; &no.config; </section> <!-- }}} --> <!-- {{{ Resources --> <section xml:id="inotify.resources"> &reftitle.resources; <para> This extension defines a stream resource returned by <function>inotify_init</function>. </para> </section> <!-- }}} --> </chapter> <!-- 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:"../../../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 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/functions/inotify-add-watch.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/functions/inotify-add-watch.xml +++ phpdoc/en/reference/inotify/functions/inotify-add-watch.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <refentry xml:id="function.inotify-add-watch" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>inotify_add_watch</refname> <refpurpose>Add a watch to an initialized inotify instance</refpurpose> </refnamediv> <refsect1 role="description"><!-- {{{ --> &reftitle.description; <methodsynopsis> <type>integer</type><methodname>inotify_add_watch</methodname> <methodparam><type>resource</type><parameter>inotify_instance</parameter></methodparam> <methodparam><type>string</type><parameter>pathname</parameter></methodparam> <methodparam><type>integer</type><parameter>mask</parameter></methodparam> </methodsynopsis> <para> <function>inotify_add_watch</function> adds a new watch or modify an existing watch for the file or directory specified in <parameter>pathname</parameter>. </para> <para> Using <function>inotify_add_watch</function> on a watched object replaces the existing watch. Using the <constant>IN_MASK_ADD</constant> constant adds (OR) events to the existing watch. </para> </refsect1><!-- }}} --> <refsect1 role="parameters"><!-- {{{ --> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>inotify_instance</parameter></term> <listitem> <para> &inotify.instance.description; </para> </listitem> </varlistentry> <varlistentry> <term><parameter>pathname</parameter></term> <listitem> <para> File or directory to watch </para> </listitem> </varlistentry> <varlistentry> <term><parameter>mask</parameter></term> <listitem> <para> Events to watch for. See <link linkend="inotify.constants">&ReservedConstants;</link>. </para> </listitem> </varlistentry> </variablelist> </para> </refsect1><!-- }}} --> <refsect1 role="returnvalues"><!-- {{{ --> &reftitle.returnvalues; <para> The return value is a unique (inotify instance wide) watch descriptor. </para> </refsect1><!-- }}} --> <refsect1 role="seealso"><!-- {{{ --> &reftitle.seealso; <para> <simplelist> <member><function>inotify_init</function></member> </simplelist> </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:"../../../../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 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/functions/inotify-init.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/functions/inotify-init.xml +++ phpdoc/en/reference/inotify/functions/inotify-init.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <refentry xml:id="function.inotify-init" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>inotify_init</refname> <refpurpose>Initialize an inotify instance</refpurpose> </refnamediv> <refsect1 role="description"><!-- {{{ --> &reftitle.description; <methodsynopsis> <type>resource</type><methodname>inotify_init</methodname> <void /> </methodsynopsis> <para> Initialize an inotify instance for use with <function>inotify_add_watch</function> </para> </refsect1><!-- }}} --> <refsect1 role="returnvalues"><!-- {{{ --> &reftitle.returnvalues; <para> A stream resource or &false; on error. </para> </refsect1><!-- }}} --> <refsect1 role="examples"><!-- {{{ --> &reftitle.examples; <para> <example xml:id="inotify-init.example.basic"><!-- {{{ --> <programlisting role="php"> <![CDATA[ <?php // Open an inotify instance $fd = inotify_init(); // Watch __FILE__ for metadata changes (e.g. mtime) $watch_descriptor = inotify_add_watch($fd, __FILE__, IN_ATTRIB); // generate an event touch(__FILE__); // Read events $events = inotify_read($fd); print_r($events); // The following methods allows to use inotify functions without blocking on inotify_read(): // - Using stream_select() on $fd: $read = array($fd); $write = null; $except = null; stream_select($read,$write,$except,0); // - Using stream_set_blocking() on $fd stream_set_blocking($fd, 0); inotify_read($fd); // Does no block, and return false if no events are pending // - Using inotify_queue_len() to check if event queue is not empty $queue_len = inotify_queue_len($fd); // If > 0, inotify_read() will not block // Stop watching __FILE__ for metadata changes inotify_rm_watch($fd, $watch_descriptor); // Close the inotify instance // This may have closed all watches if this was not already done fclose($fd); ?> ]]> </programlisting> &example.outputs.similar; <screen> <![CDATA[ array( array( 'wd' => 1, // Equals $watch_descriptor 'mask' => 4, // IN_ATTRIB bit is set 'cookie' => 0, // unique id to connect related events (e.g. // IN_MOVE_FROM and IN_MOVE_TO events) 'name' => '', // the name of a file (e.g. if we monitored changes // in a directory) ), ); ]]> </screen> </example><!-- }}} --> </para> </refsect1><!-- }}} --> <refsect1 role="seealso"><!-- {{{ --> &reftitle.seealso; <para> <simplelist> <member><function>inotify_add_watch</function></member> <member><function>inotify_rm_watch</function></member> <member><function>inotify_queue_len</function></member> <member><function>inotify_read</function></member> <member><function>fclose</function></member> </simplelist> </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:"../../../../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 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/functions/inotify-queue-len.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/functions/inotify-queue-len.xml +++ phpdoc/en/reference/inotify/functions/inotify-queue-len.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <refentry xml:id="function.inotify-queue-len" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>inotify_queue_len</refname> <refpurpose>Return a number upper than zero if there are pending events</refpurpose> </refnamediv> <refsect1 role="description"><!-- {{{ --> &reftitle.description; <methodsynopsis> <type>bool</type><methodname>inotify_queue_len</methodname> <methodparam><type>resource</type><parameter>inotify_instance</parameter></methodparam> </methodsynopsis> <para> This function allows to know if <function>inotify_read</function> will block or not. If a number upper than zero is returned, there are pending events and <function>inotify_read</function> will not block. </para> </refsect1><!-- }}} --> <refsect1 role="parameters"><!-- {{{ --> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>inotify_instance</parameter></term> <listitem> <para> &inotify.instance.description; </para> </listitem> </varlistentry> </variablelist> </para> </refsect1><!-- }}} --> <refsect1 role="returnvalues"><!-- {{{ --> &reftitle.returnvalues; <para> Returns a number upper than zero if there are pending events. </para> </refsect1><!-- }}} --> <refsect1 role="seealso"><!-- {{{ --> &reftitle.seealso; <para> <simplelist> <member><function>inotify_init</function></member> <member><function>stream_select</function></member> <member><function>stream_set_blocking</function></member> </simplelist> </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:"../../../../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 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/functions/inotify-read.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/functions/inotify-read.xml +++ phpdoc/en/reference/inotify/functions/inotify-read.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <refentry xml:id="function.inotify-read" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>inotify_read</refname> <refpurpose>Read events from an inotify instance</refpurpose> </refnamediv> <refsect1 role="description"><!-- {{{ --> &reftitle.description; <methodsynopsis> <type>array</type><methodname>inotify_read</methodname> <methodparam><type>resource</type><parameter>inotify_instance</parameter></methodparam> </methodsynopsis> <para> Read inotify events from an inotify instance. </para> </refsect1><!-- }}} --> <refsect1 role="parameters"><!-- {{{ --> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>inotify_instance</parameter></term> <listitem> <para> &inotify.instance.description; </para> </listitem> </varlistentry> </variablelist> </para> </refsect1><!-- }}} --> <refsect1 role="returnvalues"><!-- {{{ --> &reftitle.returnvalues; <para> An array of inotify events or &false; if no events was pending and <parameter>inotify_instance</parameter> is non-blocking. Each event is an array with the following keys: <simplelist> <member>wd is a watch descriptor returned by <function>inotify_add_watch</function></member> <member>mask is a bit mask of <link linkend="inotify.constants">events</link></member> <member>cookie is a unique id to connect related events (e.g. <constant>IN_MOVE_FROM</constant> and <constant>IN_MOVE_TO</constant>)</member> <member>name is the name of a file (e.g. if a file was modified in a watched directory)</member> </simplelist> </para> </refsect1><!-- }}} --> <refsect1 role="seealso"><!-- {{{ --> &reftitle.seealso; <para> <simplelist> <member><function>inotify_init</function></member> <member><function>stream_select</function></member> <member><function>stream_set_blocking</function></member> <member><function>inotify_queue_len</function></member> </simplelist> </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:"../../../../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 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/inotify/functions/inotify-rm-watch.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/inotify/functions/inotify-rm-watch.xml +++ phpdoc/en/reference/inotify/functions/inotify-rm-watch.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <refentry xml:id="function.inotify-rm-watch" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>inotify_rm_watch</refname> <refpurpose>Remove an existing watch from an inotify instance</refpurpose> </refnamediv> <refsect1 role="description"><!-- {{{ --> &reftitle.description; <methodsynopsis> <type>bool</type><methodname>inotify_rm_watch</methodname> <methodparam><type>resource</type><parameter>inotify_instance</parameter></methodparam> <methodparam><type>integer</type><parameter>watch_descriptor</parameter></methodparam> </methodsynopsis> <para> <function>inotify_rm_watch</function> removes the watch <parameter>watch_descriptor</parameter> from the inotify instance <parameter>inotify_instance</parameter>. </para> </refsect1><!-- }}} --> <refsect1 role="parameters"><!-- {{{ --> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>inotify_instance</parameter></term> <listitem> <para> &inotify.instance.description; </para> </listitem> </varlistentry> <varlistentry> <term><parameter>watch_descriptor</parameter></term> <listitem> <para> Watch to remove from the instance </para> </listitem> </varlistentry> </variablelist> </para> </refsect1><!-- }}} --> <refsect1 role="returnvalues"><!-- {{{ --> &reftitle.returnvalues; <para> &return.success; </para> </refsect1><!-- }}} --> <refsect1 role="seealso"><!-- {{{ --> &reftitle.seealso; <para> <simplelist> <member><function>inotify_init</function></member> </simplelist> </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:"../../../../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 -->