> Hi
> I am trying to read a file or get it's size while this file is written by
[quoted text clipped - 4 lines]
>
> Thanks
When you attempt to open the file, make sure you are specifying the
appropriate sharing mode. Can you show some code that illustrates
your problem?
Chris
galsi - 28 Jun 2007 15:08 GMT
Thanks for quick respons here is the relevant code
int lastvalue =0;
string fPath = @"c:\temp\build.log";
FileInfo FI = new FileInfo(fPath);
while (1>0)
{
if (lastvalue - FI.Length == 0)
{
iCounter++;
lastvalue = FI.Length;
if (iCounter > 20)
{
MessageBox.Show("times up");
break;
}
}
else
{
iCounter = 0;
}
lastvalue = FI.Length;
Thread.Sleep(SleepTime);
}
> > Hi
> > I am trying to read a file or get it's size while this file is written by
[quoted text clipped - 10 lines]
>
> Chris