+2002-05-07 Mike Gray <mikeg_us@hotmail.com>
+
+ * File.cs: Implemented CreateText method, and fixed dst compares
+ to compare against "" instead of null twice.
+
2002-05-05 Nick Drochak <ndrochak@gol.com>
* StreamReader.cs: Throw exceptions where needed. Changed Null field to
{ \r
if (src == null || dest == null)\r
throw new ArgumentNullException ();\r
- if (src == "" || dest == null ||\r
+ if (src == "" || dest == "" ||\r
src.IndexOfAny (Path.InvalidPathChars) != -1 ||\r
dest.IndexOfAny (Path.InvalidPathChars) != -1)\r
throw new ArgumentException ();\r
return new FileStream (path, FileMode.Create, FileAccess.ReadWrite,\r
FileShare.None, buffersize);\r
}\r
- \r
+
+ public static StreamWriter CreateText(string path)
+ {
+ return new StreamWriter (path, false);
+ }
+
public static void Delete (string path)\r
{\r
if (path == null)\r
{\r
if (src == null || dest == null)\r
throw new ArgumentNullException ();\r
- if (src == "" || dest == null ||\r
+ if (src == "" || dest == "" ||\r
src.IndexOfAny (Path.InvalidPathChars) != -1 ||\r
dest.IndexOfAny (Path.InvalidPathChars) != -1)\r
throw new ArgumentException ();\r