I have a kQueue observer in the Documents directory in my application. I use kQueue, which calls a callback when the contents of the document directory change.
here are two of the settings
eventToAdd.flags = EV_ADD | EV_CLEAR; eventToAdd.fflags = NOTE_WRITE;
The problem is that I get a notification when the content changes when a new file is added, but the actual file is not fully copied yet, so when I try to process a new file, I get a SIGABRT failure.
How can I delay the notification until the file is completed?
source share