Watchman, how to wait until a file is copied before subscribing to events

I look at the directory and subscribe to any added files. When I receive a subscription event, I move this file to another directory, where I do some things.

Problem. When I copy files to this directory, I sometimes get this error in finder:

The operation can’t be completed because one or more required items can’t be found. (Error code -43)

Does the observer wait until the file is fully copied before it triggers a subscription event? I used an npm module called "chokidar" and they had an option that would wait until the file closes before they exit any change / add / delete events. Does fb-watchman have something similar?

Thank you

+4
source share

All Articles