I am reading the docs on fopen() and think I want to use the r+ option
so I can read in a file, make changes to the data, write the changes
back, overwriting the original data. I believe using flock() will lock
the file while I am doing this (is this so?) so no one else can access
it. The question I have is, in the docs it says it sets the file
pointer to the begining of the file for reading, but where is the
filepointer set to for writing, or does it over write the existing
information as soon as I write back to the file?
Any help, pointers, etc appreciated
Bill H
so I can read in a file, make changes to the data, write the changes
back, overwriting the original data. I believe using flock() will lock
the file while I am doing this (is this so?) so no one else can access
it. The question I have is, in the docs it says it sets the file
pointer to the begining of the file for reading, but where is the
filepointer set to for writing, or does it over write the existing
information as soon as I write back to the file?
Any help, pointers, etc appreciated
Bill H
Comment