开发者

How to get notified as soon as a file is not open anymore?

开发者 https://www.devze.com 2023-02-07 08:13 出处:网络
I need to listen on a directory and determine exactly (or within a few seconds) when 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!

0

精彩评论

暂无评论...
验证码 换一张
取 消