You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when a file is copied into the watched location, the event fires immediately. I need to wait until the file is completely copied before calling another function from within the event firing. How might i do this? Is it possible?
The text was updated successfully, but these errors were encountered:
Just an update if it helps anyone else that encounter this issue. I the following code allows one to wait for a file copy to complete so that other operations may be performed on it afterwards:
`w := watcher.New()
One other option is writing to another directory on the same hard drive volume outside of the watcher, and then call os.Rename() to move it to where it should go. Renames should be atomic and fast, regardless of the size of the file.
when a file is copied into the watched location, the event fires immediately. I need to wait until the file is completely copied before calling another function from within the event firing. How might i do this? Is it possible?
The text was updated successfully, but these errors were encountered: