in reply to File Locking
These bring us to the end of the file, and then sets the length to zero.
seek(MYFILE, 0, 0); truncate(MYFILE, 0);
The camelbook on seek tells me that seek(MYFILE, 0, 0); brings the file pointer to the beginning of a file.
In Section
Tutorials