array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), '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' => 'ja', '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_instance
inotify_init() が返すリソース
pathname
監視対象のファイルあるいはディレクトリ。
mask
監視するイベント。定義済みの定数 を参照ください。
戻り値は、(inotify インスタンス内で) 一意な監視記述子です。
失敗した場合に false
を返します