保持文本文件与我的应用程序同步... [英] Keeping a text file synchronous to my app...

查看:55
本文介绍了保持文本文件与我的应用程序同步...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我正在开发一个基本的应用程序.它要求文本文件与之保持同步.如果对文本文件所做的任何更改都应在我的应用程序中进行更新.开始...任何帮助或建议???
谢谢..

Hey, I''m developing a basic app.. Which requires a text file to be kept synchronous with it..If any changes made in text file should be updated in my App.. I don''t where to start... Any help or suggestions???
Thank you..

推荐答案

ReadDirectoryChangesW()可用于观察目录中的更改.

http://weseetips.com/2008/06/11/how -to-get-the-filedirectory-change-notifications/ [ http://msdn.microsoft.com/zh-我们/library/windows/desktop/aa365465%28v=vs.85%29.aspx [
ReadDirectoryChangesW() can be used to observe the changes in a directory.

http://weseetips.com/2008/06/11/how-to-get-the-filedirectory-change-notifications/[^]

http://msdn.microsoft.com/en-us/library/windows/desktop/aa365465%28v=vs.85%29.aspx[^]

Please create a thread to observe the changes for the directory which have text file. If the changed file(FileName of FILE_NOTIFY_INFORMATION) is your text file, then notify your dialog to read data from text file. This way you can synchronize the text file with your application.


这篇关于保持文本文件与我的应用程序同步...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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