SpartanJ / efsw

efsw is a C++ cross-platform file system watcher and notifier.
Other
662 stars 101 forks source link

Query related to Add event #138

Closed SprRuhh closed 2 years ago

SprRuhh commented 2 years ago

Learning WinAPI and trying to get an idea.

As soon as file is copied, code generates add event followed by few modified events. How to capture the end of the event ??

Tried debugging using VS2022, PostQueuedCompletionStatus never gets hit when i perform add file operation?

Can anyone plz guide?

SpartanJ commented 2 years ago

Hi! There's no such thing as a file copy end event (in any platform AFAIK). You'll have to wait an arbitrary amount of time after the last modified event and assume that the copy ended (like, wait a couple of seconds, if no modified event was received, you can assume that the file copy ended).