howeyc/fsnotify

Need an Operation for Linux - IN_CLOSE_WRITE

radu-munteanu opened this issue · 1 comments

The real world scenario I have is about knowing when a file is fully copied to a location via FTP, SMB or other means, on Linux. The existing Create doesn't do fully justice to files, only to directories. The Write (IN_MODIFY) operation is not fully helpful in this case, because I can get a lot of these messages, but not knowing exactly when the transfer has finished.

I don't know if there is something similar to IN_CLOSE_WRITE on other systems, that's why I made this issue, to create the base for a discussion.

One way to solve this problem is to create a new cross-platform operation, which on some systems might have the same meaning with Write.

Another way, that is a bit ugly, but will fix any similar issues in the future, is to add the uint32 Mask to the Event. This way any developer could handle the Mask itself, in case it builds a platform specific software.

Seems I've posted on the old repo. Closed.