You can't, basically - you have to attempt to open the file for writing, and if you get an exception you can't write to it :(
Even if you could do a separate check first, the result would be out of date before you could start writing - you could still end up with the exception later.
It would be nice if the framework provided a TryOpen
method, admittedly...