我的应用程序如何知道在应用程序外部打开/关闭文件? [英] How does my application know about the file open/close outside the application?

查看:110
本文介绍了我的应用程序如何知道在应用程序外部打开/关闭文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我想关注用户活动.
为此,我正在开发要捕获其日志的应用程序.
因此,无论何时用户打开任何文件,我的应用程序都想知道文件名.
现在,我正在跟踪更改,例如更新文件,重新命名文件或删除文件系统中的任何文件.
我还想知道该文件的打开时间和关闭时间.
那么,有没有任何类或api,以便我的应用程序可以获取此信息?

谢谢
Rama

Hello everybody,
I want to watch on user activity.
For this i am developing the application through which i want to capture his log.
So whenever user opens any file at that time my application wants to know the file name.
Now i am tracking the changes like updating the file,renaming the file or deleting the any file in file system.
I also want to know when that file was opened and when was closed.
So is there any class or api so that my application will get this information?

Thanks
Rama

推荐答案

这就是您要查找的内容:

http://msdn.microsoft.com/en-us/library/system.io. filesystemwatcher.aspx [ ^ ]

欢呼声
This is what you''re looking for :

http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx[^]

Cheers


感谢回复
但是无论您提出什么建议,我都已做到了.
现在我想知道文件打开和关闭时的时间和名称.
意味着每当用户双击视频文件之类的文件时,我的应用程序就会在双击时获得其名称和时间.
同样地,我要关闭时间.
我希望你能理解确切的问题.

谢谢
Rama
Thanks for reply
But whatever you suggest, i had done with it.
Now i want to know the time and name of the file when it opened and closed.
Means whenever user double clicked on file such as video file then my application will get its name and time when he double clicking on it.
Similarly i want the close timings.
I hope u understand the exact problem.

Thanks
Rama


我使用了闪耀企业模式的util包来控制客户端计算机
请参阅 http://sourceforge.net/projects/shine-enterpris/files/ [ ^ ]
并阅读英文文档
祝你好运:thumbsup:
i used util package from shine enterprise pattern to control the client computer
refer to http://sourceforge.net/projects/shine-enterpris/files/[^]
and read the english doc
good luck :thumbsup:


这篇关于我的应用程序如何知道在应用程序外部打开/关闭文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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