Hey guys! i have a question... There is a better way to check the existence of a file?
Currently i have an "Until Break" follow by one "sleep" and then i check the existence of the file by using "System.IO.File.Exists(path);" function.

My problem is that seems this function use to much the CPU.
Thanks for your help.
Currently i have an "Until Break" follow by one "sleep" and then i check the existence of the file by using "System.IO.File.Exists(path);" function.
My problem is that seems this function use to much the CPU.
Thanks for your help.
Your program will check for the existence of this file over and over in an infinite loop. Infinite loops are resource hogs, but the "File Exists?" function alone doesn't bog down your CPU.
Can you please tell us what is it exactly that you are trying to do? We may be better able to help you with suggestions if we understand what you are doing.
When I check for the existence of a file I use the same "File Exists?" function, but I only check once right before I read the file. I've attached a screen image that shows how I use the function. The last blocks of "do something" or "warn user" are just pseudo code blocks to show the idea.
Best regards,