


WAITONLOCK - wait for a file
This routine will return when a file named 'filename' is written to disk.
Usage:
waitonlock(filename)

0001 function waitonlock(filename) 0002 %WAITONLOCK - wait for a file 0003 % 0004 % This routine will return when a file named 'filename' is written to disk. 0005 % 0006 % Usage: 0007 % waitonlock(filename) 0008 0009 test=0; 0010 disp(['waiting for ' filename ' hold on... (Ctrl+C to exit)']) 0011 while test==0 0012 test=exist(filename,'file'); 0013 pause(1) 0014 end