I am monitoring file system changes in a specific directory using the OSX FSEventStream. I was looking at the documentation here and I found an interesting flag described, kFSEventStreamCreateFlagIgnoreSelf.
According to the documentation using this flag the FSEvents framework won't notify you for "events that were triggered by the current process."
This sounds great. It is exactly what I want, but in practice I have found that I still get some events that were triggered by the current process.
In my limited testing, if the monitoring process creates a new file, or renames and existing file a event is still triggered. While at least some modifications of existing files don't trigger events.
Based upon the limited documentation (and the name of the flag), I would NOT expect any events to triggered by the current process.
So my question is two fold: -- Is this expected behavior? I am afraid if I count on the behavior as it exists, that it might be unintentional and in the future it might change out from underneath me.
Second: -- If it is, does anyone know which events I can expect to still be delivered when using this flag.