且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Windows的运行时中读取日志文件

更新时间:2023-02-08 21:55:55

当我遇到这类文件/共享/锁定问题时,通常只需要复制一份文件,然后将其打开即可.但是,根据您正在执行的操作,可能对您不起作用.你试过什么了?我知道您可以指定是否打开文件以供只读...但是我不确定这是否可以解决您的锁定问题.您是否尝试过 File.OpenRead [ FileStream [
When I have these kinds of file/sharing/locking issues, I usually just make a copy of the file and open that one up instead. But depending upon what you are doing that might not work for you. What have you tried so far? I know that you can specify if you are opening a file for reading only...but I''m not sure if that would solve your locking problem. Have you tried File.OpenRead[^]? Or have you tried FileStream[^] with setting the mode/access/share parms to different settings to test it?