floatdrop / gulp-watch

Watch, that actually is an endless stream
MIT License
643 stars 99 forks source link

When watch large files will trigger multiple change events #278

Closed acexy closed 7 years ago

acexy commented 7 years ago

When I use it to monitor a directory, and then through the sftp or similar tools to remotely upload a larger file to this directory, you will find a trigger event multiple times, there is no way in this case only let it trigger An event reminder, because in fact, there should only be an add or change (overwrite upload) event.

UltCombo commented 7 years ago

I believe you should be able to configure the awaitWriteFinish option to fix that problem. E.g.:

{
  awaitWriteFinish: {
    stabilityThreshold: 2000,
    pollInterval: 100
  }
}