开发者

Delphi: TJvChangeNotify/TShellChangeNotifier - file's name

开发者 https://www.devze.com 2023-03-25 11:33 出处:网络
How to know what file was changed (it\'s name) on Change Event of TJvChangeNotify (JEDI) or TShellChangeNotifier?

How to know what file was changed (it's name) on Change Event of TJvChangeNotify (JEDI) or TShellChangeNotifier?

开发者_JAVA百科

Thanks!


Both components use FindFirstChangeNotification to monitor changes. As indicated in its documentation the function does not provide information on what triggered the notification. As such the only possible way to find out what happened using these components is to keep a snapshot of the monitored folder and perform a comparison after a change occurs.

If you decide to use ReadDirectoryChangesW as suggested by FindFirstChangeNotification's documentation, see this answer. Or instead, if you decide to use SHChangeNotifyRegister see this article.

0

精彩评论

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

关注公众号