I'm looking for a very basic, easy way to lock a file which is getting overwritten by another application while I am working with it - at least I think that is the problem.
Either way, I open the file using:
And I'm looking for a switch I can throw in there which would put a lock on the file so nothing can change it while I am accessing it.
Am I having a severe brain cramp here? This seems like a very common situation.
None of the open modes seem to apply. I don't think this should be a tough problem, but I can't find anything that doesn't seem to require a huge amount of code to accomplish something that seems pretty standard.
What am I missing? Any suggestions?