File tree Expand file tree Collapse file tree 7 files changed +57
-60
lines changed
Expand file tree Collapse file tree 7 files changed +57
-60
lines changed Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 68c2c871505aadf983f16113c5b077b335ce8d76 Maintainer: daijie Status: ready -->
3+ <!-- EN-Revision: ab6d54b20ef7436c70e0c7eb982d8f44aa2df906 Maintainer: daijie Status: ready -->
44<!-- CREDITS: mowangjuanzi -->
5- <book xml : id = " book.inotify " xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
5+ <book xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xml : id = " book.inotify " >
66 <?phpdoc extension-membership =" pecl" ?>
77 <title >Inotify</title >
8-
8+
99 <!-- {{{ preface -->
1010 <preface xml : id =" intro.inotify" >
1111 &reftitle.intro;
12- <para >
12+ <simpara >
1313 Inotify 扩展提供了一系列 inotify 函数: <function >inotify_init</function >、
1414 <function >inotify_add_watch</function > 、 <function >inotify_rm_watch</function >。
15- </para >
16- <para >
15+ </simpara >
16+ <simpara >
1717 类似 C 语言里的 <function >inotify_init</function > 函数会返回文件描述符,PHP 的
18- <function >inotify_init</function >则返回 stream 资源。可以被标准的 Steam 函数使用,例如 <function >stream_select</function >、 <function >stream_set_blocking</function >
18+ <function >inotify_init</function >则返回 stream 资源。可以被标准的 Steam 函数使用,例如 <function >stream_select</function >、 <function >stream_set_blocking</function >
1919 以及 <function >fclose</function >。
20-
20+
2121 <function >inotify_read</function > 函数取代里 C 语言里读取 inotify 事件的那种方式。
22- </para >
22+ </simpara >
2323 </preface >
2424 <!-- }}} -->
25-
25+
2626 &reference.inotify.setup;
2727 &reference.inotify.constants;
2828 &reference.inotify.reference;
2929
3030</book >
31-
3231<!-- Keep this comment at the end of the file
3332Local variables:
3433mode: sgml
@@ -49,4 +48,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
4948vim: et tw=78 syn=sgml
5049vi: ts=1 sw=1
5150-->
52-
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 1535c9db42a02b4c6ed720735ee13b5af5c2bbdc Maintainer: songmeifeng Status: ready -->
3+ <!-- EN-Revision: ab6d54b20ef7436c70e0c7eb982d8f44aa2df906 Maintainer: songmeifeng Status: ready -->
44<!-- CREDITS: Luffy -->
55<refentry xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xml : id =" function.inotify-add-watch" >
66 <refnamediv >
1616 <methodparam ><type >string</type ><parameter >pathname</parameter ></methodparam >
1717 <methodparam ><type >int</type ><parameter >mask</parameter ></methodparam >
1818 </methodsynopsis >
19- <para >
19+ <simpara >
2020 <function >inotify_add_watch</function > 为 <parameter >pathname</parameter >
2121 指定的文件或目录添加新的监听,或修改已存在的监听。
22- </para >
23- <para >
22+ </simpara >
23+ <simpara >
2424 在已监听的对象上使用 <function >inotify_add_watch</function > 来替换当前的监听。(或)使用 <constant >IN_MASK_ADD</constant >
2525 常量添加监听事件。
26- </para >
26+ </simpara >
2727 </refsect1 ><!-- }}} -->
2828
2929 <refsect1 role =" parameters" ><!-- {{{ -->
3232 <varlistentry >
3333 <term ><parameter >inotify_instance</parameter ></term >
3434 <listitem >
35- <para >
35+ <simpara >
3636 &inotify.instance.description;
37- </para >
37+ </simpara >
3838 </listitem >
3939 </varlistentry >
4040 <varlistentry >
4141 <term ><parameter >pathname</parameter ></term >
4242 <listitem >
43- <para >
43+ <simpara >
4444 要监听的文件或目录
45- </para >
45+ </simpara >
4646 </listitem >
4747 </varlistentry >
4848 <varlistentry >
4949 <term ><parameter >mask</parameter ></term >
5050 <listitem >
51- <para >
51+ <simpara >
5252 监听事件。详情见 <link linkend =" inotify.constants" >&ReservedConstants; </link >。
53- </para >
53+ </simpara >
5454 </listitem >
5555 </varlistentry >
5656 </variablelist >
5757 </refsect1 ><!-- }}} -->
5858
5959 <refsect1 role =" returnvalues" ><!-- {{{ -->
6060 &reftitle.returnvalues;
61- <para >
61+ <simpara >
6262 返回值是一个唯一的(inotify 实例范围内)监听描述符,
6363 &return.falseforfailure; 。
64- </para >
64+ </simpara >
6565 </refsect1 ><!-- }}} -->
6666
6767 <refsect1 role =" seealso" ><!-- {{{ -->
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 1535c9db42a02b4c6ed720735ee13b5af5c2bbdc Maintainer: songmeifeng Status: ready -->
3+ <!-- EN-Revision: ab6d54b20ef7436c70e0c7eb982d8f44aa2df906 Maintainer: songmeifeng Status: ready -->
44<!-- CREDITS: Luffy -->
55<refentry xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xml : id =" function.inotify-init" >
66 <refnamediv >
1414 <type class =" union" ><type >resource</type ><type >false</type ></type ><methodname >inotify_init</methodname >
1515 <void />
1616 </methodsynopsis >
17- <para >
17+ <simpara >
1818 初始化 <function >inotify_add_watch</function > 使用的 inotify 实例
19- </para >
19+ </simpara >
2020 </refsect1 ><!-- }}} -->
2121
2222 <refsect1 role =" parameters" >
2626
2727 <refsect1 role =" returnvalues" ><!-- {{{ -->
2828 &reftitle.returnvalues;
29- <para >
29+ <simpara >
3030 返回资源流或发生错误时返回 &false; 。
31- </para >
31+ </simpara >
3232 </refsect1 ><!-- }}} -->
3333
3434 <refsect1 role =" examples" ><!-- {{{ -->
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 1535c9db42a02b4c6ed720735ee13b5af5c2bbdc Maintainer: songmeifeng Status: ready -->
3+ <!-- EN-Revision: ab6d54b20ef7436c70e0c7eb982d8f44aa2df906 Maintainer: songmeifeng Status: ready -->
44<refentry xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xml : id =" function.inotify-queue-len" >
55 <refnamediv >
66 <refname >inotify_queue_len</refname >
1313 <type >int</type ><methodname >inotify_queue_len</methodname >
1414 <methodparam ><type >resource</type ><parameter >inotify_instance</parameter ></methodparam >
1515 </methodsynopsis >
16- <para >
16+ <simpara >
1717 可以通过此函数知道 <function >inotify_read</function >
1818 是否会阻塞。如果返回大于零的数字,表示有待处理的事件,<function >inotify_read</function >
1919 不会阻塞。
20- </para >
20+ </simpara >
2121 </refsect1 ><!-- }}} -->
2222
2323 <refsect1 role =" parameters" ><!-- {{{ -->
2626 <varlistentry >
2727 <term ><parameter >inotify_instance</parameter ></term >
2828 <listitem >
29- <para >
29+ <simpara >
3030 &inotify.instance.description;
31- </para >
31+ </simpara >
3232 </listitem >
3333 </varlistentry >
3434 </variablelist >
3535 </refsect1 ><!-- }}} -->
3636
3737 <refsect1 role =" returnvalues" ><!-- {{{ -->
3838 &reftitle.returnvalues;
39- <para >
39+ <simpara >
4040 如果有待处理事件,返回大于零的数字。
41- </para >
41+ </simpara >
4242 </refsect1 ><!-- }}} -->
4343
4444 <refsect1 role =" seealso" ><!-- {{{ -->
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 1535c9db42a02b4c6ed720735ee13b5af5c2bbdc Maintainer: songmeifeng Status: ready -->
3+ <!-- EN-Revision: ab6d54b20ef7436c70e0c7eb982d8f44aa2df906 Maintainer: songmeifeng Status: ready -->
44<refentry xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xml : id =" function.inotify-read" >
55 <refnamediv >
66 <refname >inotify_read</refname >
1313 <type >array</type ><methodname >inotify_read</methodname >
1414 <methodparam ><type >resource</type ><parameter >inotify_instance</parameter ></methodparam >
1515 </methodsynopsis >
16- <para >
16+ <simpara >
1717 从 inotify 实例读取 inotify 事件。
18- </para >
18+ </simpara >
1919 </refsect1 ><!-- }}} -->
2020
2121 <refsect1 role =" parameters" ><!-- {{{ -->
2424 <varlistentry >
2525 <term ><parameter >inotify_instance</parameter ></term >
2626 <listitem >
27- <para >
27+ <simpara >
2828 &inotify.instance.description;
29- </para >
29+ </simpara >
3030 </listitem >
3131 </varlistentry >
3232 </variablelist >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 1535c9db42a02b4c6ed720735ee13b5af5c2bbdc Maintainer: songmeifeng Status: ready -->
3+ <!-- EN-Revision: ab6d54b20ef7436c70e0c7eb982d8f44aa2df906 Maintainer: songmeifeng Status: ready -->
44<refentry xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xml : id =" function.inotify-rm-watch" >
55 <refnamediv >
66 <refname >inotify_rm_watch</refname >
1414 <methodparam ><type >resource</type ><parameter >inotify_instance</parameter ></methodparam >
1515 <methodparam ><type >int</type ><parameter >watch_descriptor</parameter ></methodparam >
1616 </methodsynopsis >
17- <para >
17+ <simpara >
1818 <function >inotify_rm_watch</function > 移除 <function >inotify_instance</function >
1919 实例的 <parameter >watch_descriptor</parameter > 监听。
20- </para >
20+ </simpara >
2121 </refsect1 ><!-- }}} -->
2222
2323 <refsect1 role =" parameters" ><!-- {{{ -->
2626 <varlistentry >
2727 <term ><parameter >inotify_instance</parameter ></term >
2828 <listitem >
29- <para >
29+ <simpara >
3030 &inotify.instance.description;
31- </para >
31+ </simpara >
3232 </listitem >
3333 </varlistentry >
3434 <varlistentry >
3535 <term ><parameter >watch_descriptor</parameter ></term >
3636 <listitem >
37- <para >
37+ <simpara >
3838 实例要移除的监听。
39- </para >
39+ </simpara >
4040 </listitem >
4141 </varlistentry >
4242 </variablelist >
4343 </refsect1 ><!-- }}} -->
4444
4545 <refsect1 role =" returnvalues" ><!-- {{{ -->
4646 &reftitle.returnvalues;
47- <para >
47+ <simpara >
4848 &return.success;
49- </para >
49+ </simpara >
5050 </refsect1 ><!-- }}} -->
5151
5252 <refsect1 role =" seealso" ><!-- {{{ -->
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 204578526607cf2e49e02782d45a93b6c1f9018b Maintainer: songmeifeng Status: ready -->
3+ <!-- EN-Revision: ab6d54b20ef7436c70e0c7eb982d8f44aa2df906 Maintainer: songmeifeng Status: ready -->
44<!-- CREDITS: Luffy -->
5- <chapter xml : id = " inotify.setup " xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
5+ <chapter xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xml : id = " inotify.setup " >
66 &reftitle.setup;
77
88 <!-- {{{ Installation -->
99 <section xml : id =" inotify.install" >
1010 &reftitle.setup;
11- <para >
11+ <simpara >
1212 &pecl.moved;
13- </para >
14- <para >
13+ </simpara >
14+ <simpara >
1515 &pecl.info;
1616 <link xlink : href =" &url.pecl.package; inotify" >&url.pecl.package; inotify</link >.
17- </para >
17+ </simpara >
1818 </section >
1919 <!-- }}} -->
2020
2121 <!-- {{{ Resources -->
2222 <section xml : id =" inotify.resources" >
2323 &reftitle.resources;
24- <para >
24+ <simpara >
2525 此扩展定义了 <function >inotify_init</function > 返回的资源流。
26- </para >
26+ </simpara >
2727 </section >
2828 <!-- }}} -->
2929
3030</chapter >
31-
3231<!-- Keep this comment at the end of the file
3332Local variables:
3433mode: sgml
You can’t perform that action at this time.
0 commit comments