开发者

Do I need to update the watch when new sub-folder add in the monitor folder

开发者 https://www.devze.com 2023-03-06 16:25 出处:网络
I have watch a folde开发者_如何学Pythonr that will create a new sub-folder use date as name(e.g 201105124) everyday. I have start a daemon to watch it but if a new sub-folder added, the event in the n

I have watch a folde开发者_如何学Pythonr that will create a new sub-folder use date as name(e.g 201105124) everyday. I have start a daemon to watch it but if a new sub-folder added, the event in the new sub-folder cannot be trigger. IS that I need to update the watch for the new folder?

Thx for your answer.

Regards Roy


And I find that there is an parameter auto_add in function add_watch, which can auto add the directory in the watch when it is created. But it need the event IN_CREATE.


Yes, you need to use update_watch after directory creation.

0

精彩评论

暂无评论...
验证码 换一张
取 消