Re: Check if File exists
- From: "Craig Lister" <MyFirstName@xxxxxxxxxxxxxxxx>
- Date: Mon, 23 Jan 2006 07:40:57 -0000
Agreed. Aye, a sleep would be needed... and.. not sure how you do it in C#
yet, but in Delphi, maybe a Application.ProcessMessages; which basically
refreshes the screen for any changes...
"Jon Skeet [C# MVP]" <skeet@xxxxxxxxx> wrote in message
news:MPG.1e3e1d84d90b965698cd4f@xxxxxxxxxxxxxxxxxxxxxxx
> Craig Lister <MyFirstName@xxxxxxxxxxxxxxxx> wrote:
>> Is there no c# way of saying...
>>
>> while fileexists=false....
>> {
>> // Do nothing...
>> }
>
> Yes, there is. But how often do you check? Is your "do nothing" meant
> to be a sleep, or did you really mean to go back to the test
> immediately? If so, that's a tight loop which will absolutely *hammer*
> the CPU until the file is created - and if whatever's creating that
> file is CPU-bound, it could take a long time to arrive...
>
> --
> Jon Skeet - <skeet@xxxxxxxxx>
> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
> If replying to the group, please do not mail me too
.
- Follow-Ups:
- Re: Check if File exists
- From: Jon Skeet [C# MVP]
- Re: Check if File exists
- References:
- Check if File exists
- From: Ricardo Luceac
- Re: Check if File exists
- From: Craig Lister
- Re: Check if File exists
- From: Jon Skeet [C# MVP]
- Check if File exists
- Prev by Date: Re: "this" and "base"
- Next by Date: Re: OK....forget the code...how about some pointers?
- Previous by thread: Re: Check if File exists
- Next by thread: Re: Check if File exists
- Index(es):
Relevant Pages
|