in reply to Applying multiple file modes
Helo leelu,
It looks like already the monks have answered your question, but never the less I would like to add something. Read also about flock, it simply locks the file that you are trying to read/ write. In similar cases where you want to read and write on the same file it would be wise to lock it.
In your case particularly maybe this is not necessary because you use only one process reading and writing, but in case that two or more processes (scripts) where accessing the same folder that there is possibility to produce conflicts.
In order to use it you need to add only a few lines and it can save you from big big trouble.
Hope this helps.
|
|---|