|
-
September 9th, 2002, 08:05 AM
#1
How to poll a file using STL?!?!
Hi all! I'm having difficulties polling for a file to exist cq. get opened... the code is simillar to:
std::ifstream lv_InFile;
lv_InFile.open("blabla");
while (!lv_InFile.is_open() && nTimeOut--)
{
Sleep(1000);
lv_InFile.open("blabla");
}
if (!lv_InFile.is_open())
return false;
It only sees the file if it's there from the beginning, not if it gets copied somewhere during nTimeOut seconds?
Does anyone know of a neat algorithm to poll for a file using STL? Thanks in advance!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|