Re: inserting stuff into a file -
29-03-2004
You need to open a temporary file, copy the file modifing the line you want to, close the temporary file, delete the file you originally copied, and rename the temporary file to the same name as the file you just deleted.
An alternative is to read the entire file into memory, change the memory image, then write the entire file back out to disk with the same name as the original file.
botman
|