I'm trying to use System.IO.File.Replace to update a file, and it's throwing System.IOException if the destination file is on a NAS.
According to MSDN, if the destination file is on a different volume, this method throws an exception. It's right, but how do I detect if two files are on "different volumes"?
Path.GetPathRoot returns different strings if I specify the same file using drive letters, mapped drives, or UNC paths. I can't catch System.IOException because that is thrown in a variety of cases, not just if the files are on different volumes.