本文介绍了如何可靠是.netFramwork 4 FileSystemWatcher对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人用过FileSystemWatcher的框架中的4和你遇到什么问题?

Has anyone used the FileSystemWatcher in framework 4 and have you encountered any problems?

我使用它在一个窗口服务,我不能买得起它的消亡。

i am using it in a windows service and i cant afford for it to fail.

我听说从朋友那它是不是很可靠的,但我一直在测试了几个小时,现在我还没有过任何问题,但我仍然怀疑使用它......

I have heard from a friend that it is not very reliable but I have been testing for a few hours now and i havent had any problems but i am still doubting using it.....

我会AP preciate在这个问题上的任何意见,我不希望提供应用程序的客户机,然后意识到,这件事情是要崩溃......

i would appreciate any advice on this matter, i dont want to deliver the app to the the client and then realise that this thing is going to crash....

感谢

感谢您的意见家伙

我想,我的目的就应该没问题。它将服务器和它的所有检查是,如果一个文件已被修改,所以我想应该没事的本地驱动器上检查文件夹

i think for my purposes it should be ok. it will be checking a folder on the local drive of the server and all its checking for is if a file have been modified so i think it should be fine

推荐答案

FileSystemWatcher的依赖于底层的文件系统支持,因此与文件系统的可靠性问题将是为可见可靠性问题 FileSystemWatcher的。例如,如果你正在看网络目录,则网络服务器的可靠性将影响 FileSystemWatcher的的可靠性。例如,服务器可能会崩溃和重新启动。你不会被告知发生,而网络连接丢失的变化。或者服务器可能只需是prevents错误 FileSystemWatcher的从可靠地工作。

FileSystemWatcher relies on underlying file system support, so any reliability issues with the file system will be visible as reliability issues with FileSystemWatcher. For example, if you are watching a network directory, then the network server's reliability will affect FileSystemWatcher's reliability. For example, the server may crash and be restarted. You will not be notified of changes that take place while network connectivity is lost. Or the server may simply have a bug that prevents FileSystemWatcher from working reliably.

另一点是, FileSystemWatcher的只手表修改元数据。 并非所有文件改变导致改变的元数据

Another point is that FileSystemWatcher only watches for changes to metadata. Not all file changes result in changes to metadata.

这篇关于如何可靠是.netFramwork 4 FileSystemWatcher对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 17:05