2

I have watch a folder 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

Timofey Stolbov
  • 4,501
  • 3
  • 40
  • 45
Roy
  • 297
  • 1
  • 2
  • 9

2 Answers2

2

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.

Roy
  • 297
  • 1
  • 2
  • 9
0

Yes, you need to use update_watch after directory creation.

Timofey Stolbov
  • 4,501
  • 3
  • 40
  • 45