开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜