Page 1 of 1

How to be sure a file is free to be accessed?

Posted: Thu Nov 11, 2010 6:04 pm
by daft
When a program generates a beg text file, which we want in turn to read, how to know for sure, that the writing's been finished?

Re: How to be sure a file is free to be accessed?

Posted: Thu Nov 11, 2010 6:10 pm
by Trond

Code: Select all

If ReadFile(0, "Filename")
  ; File opened for reading
Else
  ; File not opened for reading. Either it doesn't exist, or another program is using it
EndIf