array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.inotify-add-watch.php', 1 => 'inotify_add_watch', ), 'up' => array ( 0 => 'ref.inotify.php', 1 => 'Inotify 函数', ), 'prev' => array ( 0 => 'ref.inotify.php', 1 => 'Inotify 函数', ), 'next' => array ( 0 => 'function.inotify-init.php', 1 => 'inotify_init', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'zh', 'path' => 'reference/inotify/functions/inotify-add-watch.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL inotify >= 0.1.2)
inotify_add_watch — 添加监听到已初始化的 inotify 实例
inotify_add_watch() 为 pathname
指定的文件或目录添加新的监听,或修改已存在的监听。
在已监听的对象上使用 inotify_add_watch() 来替换当前的监听。(或)使用 IN_MASK_ADD
常量添加监听事件。
返回值是一个唯一的(inotify 实例范围内)监听描述符,
或者在失败时返回 false
。