fsw = new MyFSWatcher();
key = fsw.subscribe(file_path);
fsw.poll();
for(event in fsw.events){
//process event
}
The problem with the above idea is that fsw.poll() returns. Right now, are implementation would not support a return. In order to accomplish this, we need to either determine how many notifications we want to grab before returning with a new list of them.
Proposed interface:
fsw = new MyFSWatcher(); key = fsw.subscribe(file_path);
fsw.poll(); for(event in fsw.events){ //process event
}
The problem with the above idea is that fsw.poll() returns. Right now, are implementation would not support a return. In order to accomplish this, we need to either determine how many notifications we want to grab before returning with a new list of them.