You can seek around files all you like, but the ability to read/write/clear the
file
in one pass is going to be very specific to the type of file you are working
with.
For your scenario, you'll want to open the file using FileShare options.
Specifically
you are looking for FileShare.None. If you can't obtain exclusive access to the
file
you'll get an exception.
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog:
http://weblogs.asp.net/justin_rogers
"Chang" <po******@hotmail.com> wrote in message
news:O3**************@TK2MSFTNGP15.phx.gbl...
hello ng,
how can I read/write/clear a ascii text file in one go (same also for binary
file). also while i am doing that no other application/process should be able
to read/write/clear to that file. also what process/method should i call to
see if there is any read/write/clear is happening on a file.
thanks,
c