Deprecated: Optional parameter $keys declared before required parameter $cms_id is implicitly treated as a required parameter in /home/www/dev/work/class/blog/CmsKey.php on line 75

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$title is deprecated in /home/www/dev/work/website/lvesu/class/controller/blog/php.php on line 28

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$outlink is deprecated in /home/www/dev/work/website/lvesu/template/blog/cms/php.manual.tpl on line 2

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$status is deprecated in /home/www/dev/work/website/lvesu/template/blog/index.head.php on line 2
PHP - Manual: inotify_add_watch - 互联网笔记

略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: inotify_add_watch

2025-05-13

inotify_add_watch

(PECL inotify >= 0.1.2)

inotify_add_watch添加监听到已初始化的 inotify 实例

说明

inotify_add_watch(resource $inotify_instance, string $pathname, int $mask): int|false

inotify_add_watch()pathname 指定的文件或目录添加新的监听,或修改已存在的监听。

在已监听的对象上使用 inotify_add_watch() 来替换当前的监听。(或)使用 IN_MASK_ADD 常量添加监听事件。

参数

inotify_instance

inotify_init()返回的资源

pathname

要监听的文件或目录

mask

监听事件。详情见 预定义常量

返回值

返回值是一个唯一的(inotify 实例范围内)监听描述符, 或者在失败时返回 false

参见

添加备注

用户贡献的备注 2 notes

up
5
lezsakdomi1 at gmail dot com
7 years ago
For an example see inotify_ini: http://php.net/inotify-init
up
4
lingtalfi
10 years ago
inotify_add_watch
returns false when you watch a non existing directory.

官方地址:https://www.php.net/manual/en/function.inotify-add-watch.php

冷却塔厂家 广告
中文GPT4.0无需注册 广告
北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3