+ /* This overload is currently only called from
+ * File.MoveFile(), Directory.Move() and
+ * Directory.GetCurrentDirectory() -
+ * everywhere else supplies a path to format
+ * with the error text.
+ */
+ switch(error) {
+ case MonoIOError.ERROR_ACCESS_DENIED:
+ return new UnauthorizedAccessException ("Access to the path is denied.");
+ case MonoIOError.ERROR_FILE_EXISTS:
+ string message = "Cannot create a file that already exist.";
+ return new IOException (message, unchecked ((int) 0x80070000) | (int) error);
+ default:
+ /* Add more mappings here if other
+ * errors trigger the named but empty
+ * path bug (see bug 82141.) For
+ * everything else, fall through to
+ * the other overload
+ */
+ return GetException (String.Empty, error);
+ }