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.
精彩评论