+2002-05-09 Nick Drochak <ndrochak@gol.com>
+
+ * File.cs (Delete): Do not throw an exception if the file does not
+ exist.
+
2002-05-08 Mike Gray <mikeg@mikegray.org>
* File.cs: According to ECMA spec and MS docs Copy(src, dest)
}\r
public static StreamWriter CreateText(string path)
- {
+ \r
+ {\r
return new StreamWriter (path, false);
+ \r
}
+ \r
+ \r
public static void Delete (string path)\r
{\r
if (path == null)\r
throw new ArgumentNullException ();\r
if (path == "" || path.IndexOfAny (Path.InvalidPathChars) != -1)\r
throw new ArgumentException ();\r
- \r
- if (!MonoIO.DeleteFile (path))\r
- throw MonoIO.GetException ();\r
+ if (!MonoIO.DeleteFile (path)){\r
+ Exception e = MonoIO.GetException ();\r
+ if (e != null && !(e is FileNotFoundException))\r
+ throw e;\r
+ }\r
}\r
\r
public static bool Exists (string path)\r