J
Jake
Sorry if this message repeats... I'm going to dumb this version down
to try to get a response more quickly, the last post I made doesn't
seem to have gotten here. I'm developing for a Pocket PC 2003 Phone
Edition.
For debugging purposes only, I'm using File.Exists in a loop with
Thread.Sleep. So it's something vaguely resembling:
[C#:]
==============================
bool hasDoneStuff = false;
// i've also tried defining the string as @"\input.txt"
string fileloc = "\\input.txt"
while (!hasDoneStuff)
{
if (File.Exists(fileloc))
{
// do stuff
hasDoneStuff = true;
}
else
{
Thread.Sleep(5000);
}
}
==============================
The problem is, File.Exists returns "false" the first time through
(correctly, as the file isn't there yet) and causes an unhandled
native exception (which seems to elude my best try...catch) the
second.
Why won't File.Exists work at an interval? Is there something I'm
missing? If so, is there a creative workaround?
TIA,
Jake
to try to get a response more quickly, the last post I made doesn't
seem to have gotten here. I'm developing for a Pocket PC 2003 Phone
Edition.
For debugging purposes only, I'm using File.Exists in a loop with
Thread.Sleep. So it's something vaguely resembling:
[C#:]
==============================
bool hasDoneStuff = false;
// i've also tried defining the string as @"\input.txt"
string fileloc = "\\input.txt"
while (!hasDoneStuff)
{
if (File.Exists(fileloc))
{
// do stuff
hasDoneStuff = true;
}
else
{
Thread.Sleep(5000);
}
}
==============================
The problem is, File.Exists returns "false" the first time through
(correctly, as the file isn't there yet) and causes an unhandled
native exception (which seems to elude my best try...catch) the
second.
Why won't File.Exists work at an interval? Is there something I'm
missing? If so, is there a creative workaround?
TIA,
Jake