如何使用文件系统监视程序触发事件? [英] How to Trigger Events with File system watcher?

查看:82
本文介绍了如何使用文件系统监视程序触发事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种减轻代码编写方面的负担的方法,以便使用系统文件监视程序来触发某些事件.创建,重命名,删除,更改是主要选项,但属性窗口中还有其他选项,例如文件名,目录名,安全性等.选择要添加文件到刚刚访问过的列表框中的最简单的属性或选项是什么?或者如何监视更改以触发事件?

提前谢谢你

"我知道此帖子有点开箱即用"

I am looking for a way to take some weight off the coding side of things to use a system file watcher to trigger some events. Created, Renamed, Deleted, Changed are the main options but there are also others in the properties window such as file name, directory name, security and so forth. What is the easiest attribute or option to choose to say add a file to a list box that has just been accessed or how can I monitor a change to then trigger an event?

thank you in advance

''I know this post is a bit out of the box''

推荐答案

如SA所写,请使用 FileSystemWatcher-Pure Chaos(第1部分,共2部分) [ ^ ]

提供良好的内部信息:-)
As SA have written, use FileSystemWatcher Class[^]

And read this CP article: FileSystemWatcher - Pure Chaos (Part 1 of 2)[^]

Gives a good inside info :-)


这篇关于如何使用文件系统监视程序触发事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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