A
andrewcw
I am sure there is an easy solution to this. I have an
absolute bullet proof requirement that only 1 application
at a time can update a file.
I know that if I Use:
System.IO.Stream fs= File.OpenWrite(fiPath);
No on else can open the file even for reading, (
unfortunately I can't either )
but what I need is to open the file exclusively, read the
text exclusively, then update it - and keep other
appliucations out until the update is done.
If I read first then the argument is being made that some
other application could have gotten in an changed the
content.
Can anyone share there snippet with me ? Thanks
absolute bullet proof requirement that only 1 application
at a time can update a file.
I know that if I Use:
System.IO.Stream fs= File.OpenWrite(fiPath);
No on else can open the file even for reading, (
unfortunately I can't either )
but what I need is to open the file exclusively, read the
text exclusively, then update it - and keep other
appliucations out until the update is done.
If I read first then the argument is being made that some
other application could have gotten in an changed the
content.
Can anyone share there snippet with me ? Thanks