Testing for File access

  • Thread starter Thread starter Phil S
  • Start date Start date
P

Phil S

When opening a file in two different threads at the same time, it will cause
an exception if the FileShare modes are incompatible with the FileAccess
modes.

Is there some way to test whether access will be allowed to the file without
having to try opening it and get an exception?
 
No, there is not, but why are the Fileshare modes incompatible if you need
to share file access?

Willy.
 
Back
Top