emcrisostomo / fswatch

A cross-platform file change monitor with multiple backends: Apple OS X File System Events, *BSD kqueue, Solaris/Illumos File Events Notification, Linux inotify, Microsoft Windows and a stat()-based backend.
https://emcrisostomo.github.io/fswatch/
GNU General Public License v3.0
5.07k stars 330 forks source link

Help configuring fswatch to act only on full file being written by SFTP clients #311

Open lewismc opened 1 year ago

lewismc commented 1 year ago

Hi folks, we are experiencing an issue where data files being created or updated by SFTP client transfer appear to generate events resulting in fswatch being executed before the full file is written. Our fswatch CLI usage can be seen at https://github.com/tagbase/tagbase-server/blob/main/services/fswatch/post.sh#L5 Note the --event Created --event MovedTo --event IsFile --event Updated flags. Can someone suggest a method for invoking fswatch only when the file (transferred by SFTP) has been fully written? Thanks in advance.

lewismc commented 1 year ago

@renato2099