I’m running syncthing since a while now syncing stuff between multiple devices mainly through a remote server (practically, not technically). Now I’ve written a small ruby program using https://github.com/guard/listen which should listen for freshly synced files within a shared folder and process a file once created within a watched folder. Now the problem is, that syncthing behaves unexpectedly: My ruby code is not able to catch a file freshly created by syncthing within my
added handler but rather within
modified. The details of the ruby library shall not matter here (I hope), after some reading and rewriting the program I understood that Syncthing creates a temporary file during the syncronisation which after transfer completion becomes moved filename-wise to the final filename. That would sort of explain my discoveries with my small piece of software.
Before I rewrite pieces of the code I wanted to know whether this understanding is correct?
best and thx, Andi