ReadDirectoryChangesW()并未明确告知有关修改的信息 [英] ReadDirectoryChangesW() doesn't specifically tell info about modification

查看:69
本文介绍了ReadDirectoryChangesW()并未明确告知有关修改的信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用Win api ReadDirectoryChangesW()监视目录的应用程序.监视目录时,如果在受监视的目录中修改了文件/子目录,此api将发送FILE_ACTION_MODIFIED事件.它并不能说明自从在受监视目录中创建文件/子目录条目以来的时间,文件或子目录中发生了哪些具体更改,例如大小,时间戳或属性,或者我遗漏了什么.自创建文件条目以来,是否有任何方法可以获取已被修改的大小,时间戳/属性?

谢谢
Raj

Hi,

I''m working on an application which monitors a directory using win api ReadDirectoryChangesW() . When monitoring the directory, this api sends FILE_ACTION_MODIFIED event in case a file/sub-directory is modified in the monitored directory. It doesn''t tell what specifically has changed in the file or sub-directory since the time the file/ sub-directory entry was created in the monitored directory e.g size, timestamp or attributes or am I missing something. Is there any way to get what exactly has been modified viz size/timestamp/attirbutes since the time the file entry was created?

Thanks
Raj

推荐答案

如果您检查msdn,您将看到有更多可用信息.
http://msdn.microsoft.com/en-us/library/aa365465% 28VS.85%29.aspx [ ^ ]

该示例可以为您提供帮助:
CDirectoryChangeWatcher-ReadDirectoryChangesW全部包装 [
If you check msdn you will see that there is more information available.
http://msdn.microsoft.com/en-us/library/aa365465%28VS.85%29.aspx[^]

This example can help you out:
CDirectoryChangeWatcher - ReadDirectoryChangesW all wrapped up[^]

Good luck!


您可以研究MSDN库中的Fwatch示例
you can study Fwatch Sample from MSDN library


这篇关于ReadDirectoryChangesW()并未明确告知有关修改的信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆