How to get notified as soon as a file is not open anymore?
I need to listen on a directory and determine exactly (or within a few seconds) when a file is not开发者_如何转开发 open anymore.
How do I do this in C#?
Windows doesn't support notifications for this. Use a 'few second' timer to periodically retry.
Have a look at FileSystemWatcher, I think it would help you.
Good luck!
精彩评论