Pause script until external app writes a file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
doughemi
Forum Newbie
Posts: 11
Joined: Wed Dec 02, 2009 1:40 pm

Pause script until external app writes a file

Post by doughemi »

My script directs the Filemaker API to write a file. This may take several seconds. Can I use a construct like

Code: Select all

while(!file_exists($myfile)) {
wasteSomeTime();
}
carry_on();
 
to check if the file has been written?

If so, what should the wasteSomeTime() function contain?

--Doug
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Re: Pause script until external app writes a file

Post by daedalus__ »

Post Reply