2003-12-25 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / corlib / System.IO / ChangeLog
1 2003-12-25  Atsushi Enomoto <atsushi@ximian.com>
2
3         * Path.cs : Fixed GetFullPath() (and CanonicalizePath()), 
4           HasExtension(), GetPathRoot() and IsPathRooted() to fit with tests.
5
6 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
7
8         * FileStream.cs: (.ctor) do not set handle
9         in object until after it is validated via
10         GetFileType so finalizer doesn't see bad handles and
11         initialize this.handle to InvalidHandle
12
13 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
14
15         * MonoIO.cs: SetFileTime() Failed Open returns InvalidHandle
16         not Zero
17
18 2003-12-17  Atsushi Enomoto <atsushi@ximian.com>
19
20         * Directory.cs : SetCurrentDirectory() should raise errors for
21           some kind of arguments.
22
23 2003-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24
25         * Path.cs: GetTempPath () ends with DirectorySeparatorChar. Fixes bug
26         #52056.
27
28 2003-12-06  Ravindra  <rkumar@novell.com>
29         *MonoIO.cs: Added a new exception case. It is thrown 
30         when a directory creation is attempted with a name that
31         is already used by an existing file.
32
33 2003-11-28  Dick Porter  <dick@ximian.com>
34
35         * Path.cs: Use the char form of LastIndexOf, so that the
36         comparison is done with the Invariant culture.
37
38 2003-11-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
39
40         * Directory.cs: provide the path when getting the IOException.
41
42 2003-11-18  John Luke  <jluke@cfl.rr.com>
43
44         * CheckArgument.cs:
45         (PathLength): fix recursion found by JonK
46         
47 2003-11-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
48
49         * Directory.cs:
50         (GetCurrentDirectory):
51         (SetCurrentDirectory): moved here from Environment. Handle error cases.
52
53         * MonoIO.cs: add path to the default error message.
54
55 2003-11-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
56
57         * StringReader.cs: fixed ReadLine for some cases where there are mixed
58         '\r' and '\n'. Closes bug #51020.
59
60 2003-11-14 Ben Maurer  <bmaurer@users.sourceforge.net>
61
62         * MemoryStream.cs (.ctor): We need to check if buffer is null
63         before we get the Length of it.
64
65 2003-11-14  Miguel de Icaza  <miguel@ximian.com>
66
67         * StreamReader.cs, TextReader, StreamReader (Read): Add [Out]
68
69 2003-11-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
70
71         * Directory.cs: allow directory names without wildcards in the pattern.
72         Fixes bug #3 50969.
73
74         * SearchPattern.cs: made InvalidChars and WildcardChars internal.
75
76 2003-11-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
77
78         * FileStream.cs: use the argument name when throwing exception.
79
80         * StreamReader.cs:
81         * StringReader.cs:
82         * TextReader.cs: added [In] attribute for the array in Read.
83
84 2003-11-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
85
86         * DirectoryInfo.cs: fixed ToString. Closes bug #50842.
87
88 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
89
90         * Directory.cs: Adjust for missing PlatformID.Unix.
91
92 2003-10-28  Miguel de Icaza  <miguel@ximian.com>
93
94         * StreamReader.cs: Add checks for disposed stream from bug report
95         #48696 (Patrik Reali)
96
97         * TextReader.cs (Read): Return the total number of bytes read, 
98         patch from Patrik Realli.
99
100 2003-10-20  Miguel de Icaza  <miguel@ximian.com>
101
102         * FileStream.cs public FileStream (string name, FileMode mode)
103         constructor: If we pass FileMode.Append, we can not pass
104         FileAccess.ReadWrite.  This fixes bug 44959
105
106 2003-09-26  Miguel de Icaza  <miguel@ximian.com>
107
108         * BufferedStream.cs (Write): Use CanWrite in Write.  Patch from
109         Francisco Figueiredo Jr.
110
111 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
112
113         * BinaryReader.cs: return the correct number of bytes read when there
114         are some bytes from peeking.
115
116 2003-09-11  Lluis Sanchez Gual  <lluis@ximian.com>
117
118         * BufferedStream.cs, FileStream.cs, MemoryStream.cs, Stream.cs:
119           Added [In,Out] attributes to Read method.
120
121 2003-08-05  Martin Baulig  <martin@ximian.com>
122
123         * StreamReader.cs (DiscardBufferedData): Do the same like on the
124         ms runtime: just discard the buffered data, but don't modify the
125         BaseStream.Position.
126
127 2003-08-04  Martin Baulig  <martin@ximian.com>
128
129         * StreamReader.cs (DiscardBufferedData): Implemented.
130
131 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
132
133         * IntPtrStream.cs (Read): Use correct offset here;  Change the
134         code to use a byte* instead of an IntPtr to reduce the number of
135         casts used. 
136
137         (Read): Use Marshal.Copy instead of the now
138         deprecated MemCopy.
139
140         (IntPtrStream): New stream implementation, it maps to a region in
141         memory.
142
143 2003-07-23  Duncan Mak  <duncan@ximian.com>
144
145         * StreamReader.cs (Initialize): This method is not exposed in the
146         API, mark as internal.
147
148 Fri Jul 18 14:42:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
149
150         * MonoIO.cs: 64bit fix from Bernie Solomon <bernard@ugsolutions.com>.
151
152 2003-07-16  Dick Porter  <dick@ximian.com>
153
154         * FileInfo.cs: Update path info when a file is moved.  Patch by
155         John Luke <jluke@cfl.rr.com>, fixes bug 44253.
156
157 2003-07-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
158
159         * MemoryStream.cs: fixed bug #46060. Thanks to Carlos Barcenilla.
160
161 2003-06-30  Zoltan Varga  <vargaz@freemail.hu>
162
163         * FileStream.cs (Dispose): Flush the buffer even if we don't own the
164         handle.
165         * FileStream.cs: Add a new constructor parameter to turn off buffering.
166         This is used by the Console.OpenStandard...() methods. Also fix
167         argument checking in InitBuffer(), so a zero buffer size is also 
168         rejected.
169
170 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
171
172         * Stream.cs: use async.delegate invoke 
173
174 2003-06-18  Nick Drochak <ndrochak@gol.com>
175
176         * FileSystemInfo.cs: Refresh cache when changeing file times.
177
178 2003-06-11  Zoltan Varga  <vargaz@freemail.hu>
179
180         * FileStream.cs: Fix errors in previous checkins:
181         (Write): Only take the shortcut route if the data is longer than the
182         buffer length.
183         (Write): Flush the buffer before writing out the new data
184         (Write): Flush the buffer after writing out a segment since otherwise
185         we will go into an infinite loop.
186         (FlushBuffer): Remove my last change since it was clearly wrong.
187         (Seek): Run FlushBuffer () after the in-buffer seek optimization.
188         (Seek): Only use the in-buffer optimization if the buffer is not
189         empty.
190         (Length): Call FlushBuffer () since buffer data might change the size
191         of the stream.
192
193 2003-06-09  Ville Palo <vi64pa@kolumbus.fi>
194
195         * FileStream.cs:
196         - removed unusefull bugfix (DirectoryNotFoundException)
197         - Flush before seek.
198         
199 2003-06-09  Ville Palo <vi64pa@kolumbus.fi>
200
201         * FileStream.cs: Check buffer size before append/read -exceptios
202         
203 2003-06-09  Ville Palo <vi64pa@kolumbus.fi>
204
205         * FileStream.cs: Check DirectoryNotFound before FileNotFound.
206         
207 2003-06-09  Ville Palo <vi64pa@kolumbus.fi>
208
209         * FileStream.cs: Does not anymore flush while writing
210         
211 2003-06-02  Nick Drochak <ndrochak@gol.com>
212
213         * FileInfo.cs (MoveTo): Throw exceptions when dest exists, and check
214         for null too.
215
216 2003-05-27  Lluis Sanchez Gual <lluis@ximian.com>
217
218         * BinaryReader.cs: Stream don't need to be seekable to use PeekChar.
219
220 2003-05-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
221
222         * Path.cs: fixed bug #42631.
223
224 2003-05-22  Zoltan Varga  <vargaz@freemail.hu>
225
226         * File.cs (Move): Allow moving of directories.
227         Fix 'destination is a directory' test.
228
229 2003-05-21  Ben Maurer  <bmaurer@users.sourceforge.net>
230
231         * StringWriter.cs: Fixed bug #43431: "StringWriter
232         .ctor(CultureInfo) does not create a new StringBuilder ()"
233
234 2003-05-11  Zoltan Varga  <vargaz@freemail.hu>
235
236         * FileStream.cs (FlushBuffer): After a flush, the buffer is
237         advanced by buf_offset bytes, not buf_length bytes.
238
239 2003-05-16  Dick Porter  <dick@ximian.com>
240
241         * MonoIO.cs: Implement GetTempPath
242
243 2003-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
244
245         * DirectoryInfo.cs: fixed bug #42991.
246         * Path.cs:
247         (CanonicalizePath): store the value of the trimmed input string. Make it
248         work with paths such as "/home/xxx/.".
249
250 2003-05-08  Ben Maurer <bmaurer@users.sourceforge.net>
251         * Path.cs 
252         (CanonicalizePath) Fixed bug #42631, which duplicated the
253         root part of the path under Windows.
254
255 2003-05-08  Ville Palo <vi64pa@kolumbus.fi>
256
257         * FileSystemInfo.cs: Added 1.1 properties LastAccessTimeUtc, 
258         LastWriteTimeUtc and CreationTimeUtc
259         
260 2003-05-07  Ben Maurer <bmaurer@users.sourceforge.net>
261         * Path.cs 
262         (GetPathRoot) Added support for UNC paths.
263         (CanonicalizePath) Added optimizations per Miguel's requests.
264
265 2003-05-06  Ville Palo <vi64pa@kolumbus.fi>
266
267         * BufferedStream.cs: 
268           - Removed unusefull code.
269           - Added ObjectDisposedException to Position
270           - Dont flush if stream is allready closed.
271           - Flush throws also ObjectDisposedException.
272         * Directory.cs:
273           - GetFileSystemEtries: ArgumentNullException if pattern is null
274         * DirectoryInfo.cs: Fixed little MoveTo () bug.
275         * FileInfo.cs:
276           - Exists: If file does not exists when instance is created the
277           value of the Exists property does not change even if file is created
278           afterwards.
279           - Delete: If path is a directory UnauthorizedException is thrown.
280           - CopyTo: Now we can overwrite file if wanted.
281         * Path.cs: 
282           - GetFullPath: Now throws exception when path is "   ".
283         
284 2003-05-04  Ben Maurer <bmaurer@users.sourceforge.net>
285         * Directory.cs (GetLogicalDrives) Marked as MonoTODO
286         because we need to implement the method on Windows.
287         * Path.cs 
288         (CanonicalizePath) Added new function to get
289         rid of . and .. in path names. Need to figure out what
290         other functions should call this.
291         (GetFullPath) Added call to the above function.
292         
293 2003-05-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
294
295         * StreamReader.cs:
296         (.ctor): fixed parameters passed to FileNotFoundException.
297
298 2003-04-25  Dietmar Maurer  <dietmar@ximian.com>
299
300         * BinaryReader.cs (Read): make sure the buffer is big enough (fix
301         bug # 40702)
302
303 2003-04-24  Pedro Martínez Juliá  <yoros@wanadoo.es>
304
305         * BufferedStream.cs: Test if it's possible to seek in a Stream
306         before access to Position. This prevents the exception thrown when
307         the stream is System.Net.Sockets.NetworkStream.
308
309 2003-04-22  Ville Palo <vi64pa@kolumbus.fi>
310
311         * Directory.cs: clean up --> performance improvment. Some exceptions
312         are now checked in File.cs.
313         * File.cs: Implemented Get/SetXXXTimeUtc () methods. Some bugfixes.
314         
315 2003-04-21  Ville Palo <vi64pa@kolumbus.fi>
316
317         * Directory.cs: lots of fixes. 
318           - Added GetXXXtimeUtc () (v1.1) methods.
319           - Added SetXXXtimeUtc () (v1.1) methods.      
320         
321 2003-04-20  Igor Nosyryev <nosyryev@attbi.com>
322
323         * StringReader.cs (Read): Increment nextChar by charsToRead
324         instead of count, that will guarantee that the next time the
325         method is called, it will return 0 on an empty string rather than
326         throwing an exception
327
328 2003-04-19  Ville Palo <vi64pa@kolumbus.fi>
329
330         * BufferedStream.cs: Some fixes, mostly throwing exceptions.
331         * MemoryStream.cs: Changed the order of exception checking
332         * StringReader.cs: little clean up
333         
334 2003-04-14  Ville Palo <vi64pa@kolumbus.fi>
335
336         * BinaryWriter.cs: Fixed decimal writing and lots of 
337         ObjectDisposedExceptions added.
338         
339 2003-04-13  Ville Palo <vi64pa@kolumbus.fi>
340
341         * BinaryReader.cs: Fix to ReadDecimal() method.
342         
343 2003-04-13  Ville Palo <vi64pa@kolumbus.fi>
344
345         * StringReader.cs: Added some ObjectDisposedExceptions.
346         * StringWriter.cs: Added some ObjectDisposedExceptions.
347         * BinaryReader.cs: Added some ObjectDisposedExceptions.
348         
349 2003-04-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
350
351         * FileStream.cs: fixed the windows build. This is an mcs bug. I'll
352         fill a bug report.
353
354 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
355
356         * FileStream.cs: fixed bug #40182 and made more unit test pass.
357
358 2003-04-11  Ville Palo <vi64pa@kolumbus.fi>
359
360         * FileStream.cs: Added new methods Lock () and Unlock ()
361         
362 2003-04-11  Ville Palo <vi64pa@kolumbus.fi>
363
364         * StringReader.cs: Throws exceptions if constructor parameter is null.
365         
366 2003-04-11  Ville Palo <vi64pa@kolumbus.fi>
367
368         * StringWriter.cs: Now throws an exception if StringBuilder parameter
369         is null
370         
371 2003-04-05  Miguel de Icaza  <miguel@ximian.com>
372
373         * TextWriter.cs: Implemented Synchronized method.
374
375         * TextReader.cs: Implemented Synchronized method.
376
377 2003-04-04  Miguel de Icaza  <miguel@ximian.com>
378
379         * FileStream.cs (Read, ReadByte, Seek): throw
380         ObjectDisposedException if the handle has been released.
381         
382         (Read): Throw exceptions specified in the spec.
383
384         (Read, Write, ReadSegment, WriteSegment): There is no requirement for any
385         instance methods of FileStream to be thread safe, so remove all
386         the calls to lock on the object
387
388 2003-03-31  Nick Drochak <ndrochak@gol.com>
389
390         * Path.cs (GetDirectoryName): Throw proper execption when path is empty.
391
392 2003-03-20  Lluis Sanchez Gual <lluis@ideary.com>
393
394         * FileNotFoundException.cs: fixed serialization bug.
395
396 2003-03-18  Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
397
398         * StringWriter.cs : don't release internalString on Dispose().
399
400 2003-03-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
401
402         * StreamReader.cs: fixed bug #39280.
403
404 2003-03-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
405
406         * Directory.cs: readded mkdir -p behavior. Thanks to kiwnix for
407         pointing it out.
408
409 2003-03-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
410
411         * MemoryStream.cs: general fixes and reformatted. Passes all tests in
412         the new MemoryStreamTest.
413
414 2003-03-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
415
416         * MemoryStream.cs: undo my bogus fix in ToArray. Allow GetBuffer and
417         ToArray even after closing the stream.
418
419 2003-03-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
420
421         * Directory.cs:
422         (Move): don't use File.Move.
423         * DirectoryInfo.cs: fixed Name property.
424         
425         Fixes bug #37755.
426
427 2003-03-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
428
429         * DirectoryInfo.cs: changed ToString to match MS behavior.
430         * Path.cs: further fixes to GetDirectoryName to return null in the
431         same cases that MS does.
432
433         Fixes bug #38387.
434
435 2003-03-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
436
437         * Path.cs: fixed a couple of bugs reported in #35906.
438
439 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
440
441         * Directory.cs: fixed bugs #38939 and #38940. No need for separate
442         unix/windows/unc shares code paths.
443
444 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
445
446         * File.cs: fix by Elan Feingold <efeingold@mn.rr.com> for
447         SetCreationTime, SetLastAccessTime and SetLastWriteTime.
448
449 2003-02-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
450
451         * MemoryStream.cs:
452         (ToArray): return only the portion of the buffer that contains
453         data, not the whole buffer. (note: this makes XmlDocument.Load work
454         again with documents that have a <?xml without the 'encoding'
455         attribute, which makes gtk-sharp generator work again).
456
457 2003-02-25  Nick Drochak <ndrochak@gol.com>
458
459         * File.cs (GetCreationTime): Throw proper execption when path is not
460         found.
461
462 Tue Feb 25 11:55:35 CET 2003 Paolo Molaro <lupus@ximian.com>
463
464         * MemoryStream.cs: make it behave sanely when the stream is
465         incrementally expanded.
466
467 2003-02-21  Dick Porter  <dick@ximian.com>
468
469         * FileStream.cs: Use locks around buffer manipulations.  Fixes bug
470         32344
471
472 2003-02-18  Dick Porter  <dick@ximian.com>
473
474         * FileStream.cs: Make FileMode.Append work, and check for Seeking
475         back over old data (undocumented ms behaviour, throws an exception
476         if you try).  Fixes bug 35975.
477
478 2003-02-17  Dick Porter  <dick@ximian.com>
479
480         * FileStream.cs: Don't close the handle if the stream doesn't own
481         it.  Patch from Raymond Penners (raymond@dotsphinx.com), bug
482         35623.
483
484 2003-02-14  Zoltan Varga  <vargaz@freemail.hu>
485
486         * FileStream.cs (Write): flush after writing the last segment as well.
487
488 2003-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
489
490         * StringReader.cs:
491         (ReadLine): fixed the case when the string ends with a '\n'.
492
493 2003-02-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
494
495         * MemoryStream.cs: create the buffer of the specified capacity.
496
497 2003-01-31  Patrik Torstensson
498
499         * MemoryStream.cs: use BlockCopyInternal instead of Array.Copy, this is
500         the same way as MS does it (performance improvement)
501
502 2003-01-29  Zoltan Varga  <vargaz@freemail.hu>
503
504         * Directory.cs (GetFileSystemEntries): moved error handling to the
505         correct instance of GetFileSystemEntries so all callers can enjoy it.
506
507 2003-01-28  Zoltan Varga  <vargaz@freemail.hu>
508
509         * File.cs: add error handling to Get...Time methods.
510
511 2003-01-26  Zoltan Varga  <vargaz@freemail.hu>
512
513         * Directory.cs: fix GetParent so it actually works.
514
515 2003-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
516
517         * Path.cs: fixlet to ChangeExtension for the case when the path is
518         empty.
519
520 2003-01-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
521
522         * BufferedStream.cs: don't try to write a 0 sized array on when
523         flushing the stream.
524         
525         Fixes bug #37045.
526
527 2003-01-18  Jonathan Pryor <jonpryor@vt.edu>
528
529         * FileStream.cs: Add IsAsync property.  (Documented in "C# In A Nutshell".)
530
531 2003-01-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
532
533         * MemoryStream.cs: fixed bug #36319.
534
535 2002-12-16  Eduardo Garcia Cebollero <kiwnix@yahoo.es>
536         
537         * Directory.cs: Some fixes to SMB shares handling, and not compiling 
538         with csc, mcs compiles it correctly (mcs bug 35652)
539
540 2002-12-14  Eduardo Garcia Cebollero <kiwnix@yahoo.es>
541
542         * Directory.cs: Some fixes related to correct some exceptions thrown
543
544 2002-12-11  Eduardo Garcia Cebollero <kiwnix@yahoo.es>
545
546         * Directory.cs: Some Exceptions added, fixed GetParent(),
547         CreateDirectory() should work with unix, native windows and
548         windows samba shares. Converted end-lines from dos-mode to unix-mode
549
550 2002-12-08  Eduardo Garcia Cebollero <kiwnix@yahoo.es>
551
552         * Directory.cs: CreateDirectory  works now with Absolute paths
553         too, not only with relative ones.
554
555 2002-12-07  Peter Williams  <peterw@ximian.com>
556
557         * Directory.cs: Don't use the uninitialized pathsumm here.
558         Don't try and create "" if we're using an absolute path.
559
560 2002-12-07  Eduardo Garcia Cebollero <kiwnix@yahoo.es>
561
562         * Directory.cs: Now the creation of a new directory works recursively
563         it will make parents as needed.
564
565 2002-11-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
566
567         * BufferedStream.cs: applied patch from <carlosga@telefonica.net> that
568         fixes Flush ().
569
570 Tue Nov 19 13:01:22 CET 2002 Paolo Molaro <lupus@ximian.com>
571
572         * StreamWriter.cs: output the encoding preamble at the start of a
573         stream if needed.
574
575 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
576
577         * StreamReader.cs: Changed all Encoding.UTF8 to Encoding.UTF8Unmarked.
578
579 2002-11-06  Miguel de Icaza  <miguel@ximian.com>
580
581         * StreamWriter.cs: Changed all Encoding.UTF8 to Encoding.UTF8Unmarked.
582
583 2002-10-31  Dick Porter  <dick@ximian.com>
584
585         * FileStream.cs: Fix buffering properly this time.  Also kludge
586         around broken pipe errors, treating them as EOF instead of
587         throwing an IO exception.
588
589         * MonoIO.cs: Return the error status in a parameter, as the
590         GetLastError() value has long since been blown away if we try and
591         look it up in a subsequent internal call invocation.
592
593         * FileSystemInfo.cs: 
594         * FileInfo.cs: 
595         * File.cs: 
596         * Directory.cs: MonoIO methods now have an error parameter
597
598 2002-10-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
599
600         * TextReader.cs: implemented ReadBlock ().
601
602 2002-10-30  Miguel de Icaza  <miguel@ximian.com>
603
604         * StreamWriter.cs: Ditto for Null stream.
605
606         * BinaryReader.cs: Use Unmarked here too.
607
608         * BinaryWriter.cs: Use the UTF8Unmarker encoding by default, this
609         is what .NET does.
610
611 2002-10-23  Dick Porter  <dick@ximian.com>
612
613         * FileStream.cs: Implemented CanSeek, and used it around all the
614         calls to MonoIO.Seek.  Fixed buffering in Read() so that it
615         doesn't block forever on short reads.
616
617         * MonoFileType.cs: New enum for GetFileType
618         
619         * MonoIO.cs: Added GetFileType
620
621 2002-10-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
622
623         * StreamReader.cs: ReadLine now treats a \r not followed by a \n as a
624         \n (this is what MS does).
625
626 2002-10-18  Dick Porter  <dick@ximian.com>
627
628         * FileStream.cs: SeekOrigin.End still calculates the offset from
629         the end of the file with positive values extending the length.
630         Fixes bug 32471.
631
632 2002-10-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
633
634         * Path.cs: some cleanup. Thanks to Martin Aliger.
635
636 2002-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
637
638         * FileStream.cs: throw an exception if trying to open a directory.
639         Thanks to Martin Aliger.
640
641 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
642
643         * Path.cs: fixes bug #28046.
644
645 2002-09-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
646
647         * StreamReader.cs: give more information when wrong parameters passed.
648
649 2002-09-21  Miguel de Icaza  <miguel@ximian.com>
650
651         * FileStream.cs: Do not call FSync on the file.
652
653 2002-09-16  Miguel de Icaza  <miguel@ximian.com>
654
655         * TextWriter.cs (Null): The Null field should be an instance of a
656         TextWriter class that does nothing, so it is an instance of the
657         NullTextWriter class.
658
659 2002-09-16  Nick Drochak  <ndrochak@gol.com>
660
661         * MemoryStream.cs (Close): Don't throw an exception if the stream
662         is already closed.
663
664 2002-09-15  Miguel de Icaza  <miguel@ximian.com>
665
666         * FileStream.cs (Dispose): Call FlushBuffer(), and not Flush, as
667         Flush calls fsync().  
668
669         The API docs show no explicit mention that Flush() should even do
670         an fsync, I am thinking that we should drop that from the
671         runtime. 
672
673 2002-09-09  Miguel de Icaza  <miguel@ximian.com>
674
675         * StreamWriter.cs: When no encoding is provided, create an
676         encoding without markers, this is what MS does.
677
678 2002-09-06  Miguel de Icaza  <miguel@ximian.com>
679
680         * StreamReader.cs: Implement detection of byte marks and skipping
681         of byte marks at the beginning of the stream.
682
683         (ReadToEnd): Use buffered read instead of char-by-char
684         processing. 
685
686         Correct the default arguments for creating the StreamReader.
687
688 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
689
690         * CheckArgument.cs: fixed check for empty string.
691         * Path.cs: various fixes. It passes all the tests in new PathTest.
692
693 2002-08-29  Duncan Mak  <duncan@ximian.com>
694
695         * StreamWriter.cs: Set DisposedAlready after calling flush. Fixes
696         the build for gtk#.
697
698 2002-08-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
699
700         * BinaryReader.cs:
701         * BinaryWriter.cs:
702         * MemoryStream.cs:
703         * StreamReader.cs:
704         * StreamWriter.cs:
705         * StringReader.cs:
706         * StringWriter.cs:
707         * TextWriter.cs: IDisposable fixes.
708
709 2002-08-24  Miguel de Icaza  <miguel@ximian.com>
710
711         * StreamReader.cs: Removed TODOs, as the code seems to be
712         complete. 
713
714         * Path.cs (GetTempFileName): Make this routine atomic by not
715         testing and then creating, but using the create call to ensure
716         that we own the filename.
717
718 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
719
720         * FileLoadException.cs: implemented ToString.
721
722         * StreamWriter.cs: added Null field and implemented Write (char) and
723         Write (char []).
724
725 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
726
727         * StreamReader.cs: implemented NullStreamReader.
728
729 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
730
731         * Path.cs (GetDirectoryName): Fix for filenames with size = 1
732
733         * File.cs: Removed all references that threw exceptions when the
734         paths contains a colon, as this is a valid part of an identifier
735         on Unix.
736
737         Everywhere: The String.Empty return from GetDirectoryName means
738         that there is no directory information about the path.
739
740 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
741
742         * FileNotFoundException.cs: use Message and InnerException from base
743         class. Changed Message and ToString ().
744
745 2002-08-19  Dick Porter  <dick@ximian.com>
746
747         * BinaryWriter.cs: The length of a string is counted in bytes, not
748         chars
749
750 2002-08-18  Dick Porter  <dick@ximian.com>
751
752         * BinaryReader.cs: Fixed buffering
753
754 2002-08-09  Nick Drochak  <ndrochak@gol.com>
755
756         * BinaryReader.cs: added virtual to Dispose(bool).
757
758 2002-08-03  Jason Diamond  <jason@injektilo.org>
759
760         * StringWriter.cs: Return UnicodeEncoding for Encoding property.
761
762 2002-08-03  Jason Diamond  <jason@injektilo.org>
763
764         * StreamWriter.cs: Use GetByteCount() to get exact length instead
765         of GetMaxByteCount when converting chars to bytes.
766
767 2002-07-31  Duncan Mak  <duncan@ximian.com>
768
769         * StreamReader.cs: 
770         (Dispose): Added and implmented.
771
772         * StreamWriter.cs: 
773         (Dispose): Fixed visibility.
774         (Initialize): Fixed visibility, made internal.
775
776         * BinaryReader.cs:
777         (Dispose): Fixed visibility.
778
779 2002-07-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
780
781         * File.cs:
782         (Create): allow file names without path.
783
784 Fri Jul 26 15:45:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
785
786         * FileStream.cs: patch from erik@bagfors.nu to add
787         Name property support.
788
789 2002-07-20  Dick Porter  <dick@ximian.com>
790
791         * MonoIO.cs: Added icall to CreatePipe
792
793 2002-07-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
794
795         * FileInfo.cs: fixes buglet #27940
796
797 2002-07-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
798
799         * Path.cs: removed unneeded line from GetExtension.
800
801 2002-07-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
802
803         * FileStream.cs:
804         (.ctor): call MonoIO.GetException with the file name.
805
806 2002-07-02  Mike Kestner  <mkestner@speakeasy.net>
807
808         * StreamReader.cs: Guard against ^\n lines as pointed out by Gonzalo.
809
810 2002-07-02  Mike Kestner  <mkestner@speakeasy.net>
811
812         * StreamReader.cs: Revert the last Peek change and fix the ReadLine
813         end of line detection code instead.
814
815 2002-07-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
816
817         * StreamReader.cs:
818         (Peek): no need to have seek capabilitites. 
819
820 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
821
822         * Path.cs (ChangeExtension): handle some special cases (fixes bug #25319)
823
824         * File.cs (Delete): only call Directory.Exists() if DirName != ""
825
826 2002-06-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
827
828         * Directory.cs: fixed bug #26133 and also test if the directory exist
829         before performing the search.
830
831 2002-06-12  Nick Drochak  <ndrochak@gol.com>
832
833         * StringReader.cs (ReadLine): Return null when we get to end of the
834         string.
835
836 2002-05-22  Lawrence Pit  <loz@cable.a2000.nl>
837
838         * StreamWriter.cs: added ability to write null value
839         
840 2002-05-19  Lawrence Pit  <loz@cable.a2000.nl>
841
842         * Stream.cs: NullStream.ReadByte now returns -1 instead of 0 to
843         prevent endless loops.
844
845 2002-05-17  Dan Lewis  <dihlewis@yahoo.co.uk>
846
847         * FileStream.cs: Enforce lower bound on buffer size.
848
849 2002-05-16  Piers Haken <piersh@friskit.com>
850
851         * Stream.cs: Implement synchronous {Begin|End}{Read|Write}() methods.
852
853 2002-05-17  Nick Drochak  <ndrochak@gol.com>
854
855         * StreamWriter.cs: Implement buffering.  Also implemented dispose
856         pattern as recommended by the MS docs.  Must call Close() now
857         to ensure the buffer is flushed.
858
859 2002-05-15  Nick Drochak  <ndrochak@gol.com>
860
861         * Path.cs (GetDirectoryName): Return String.Empty if there is no
862         directory
863
864         * StreamReader.cs: Add some parameter checking on file names.
865
866         * StreamWriter.cs: Add some parameter checking on file names.
867
868 2002-05-14 Nick Drochak  <ndrochak@gol.com>
869
870         * File.cs: Add parameter checks to most methods. Not completely done,
871         but all current unit tests pass.
872
873         * Path.cs: Implement GetTempFileName().
874
875 2002-05-10  Nick Drochak  <ndrochak@gol.com>
876
877         * StreamWriter.cs (Flush): Throw proper exception if internal stream
878         has already been closed when we try to flush.
879
880 2002/05/10  Nick Drochak <ndrochak@gol.com>
881
882         * FileNotFoundException.cs (ToString): Don't try to use the inner
883         exception, because it might be null.  Use the message instead.
884
885 2002-05-09  Nick Drochak  <ndrochak@gol.com>
886
887         * File.cs (Delete): Do not throw an exception if the file does not
888         exist.
889
890 2002-05-08  Mike Gray     <mikeg@mikegray.org>
891
892         * File.cs: According to ECMA spec and MS docs Copy(src, dest)
893         should not overwrite dest by default.
894
895 2002-05-08  Nick Drochak  <ndrochak@gol.com>
896
897         * StreamWriter.cs: Add paramter check to constructors and throw
898         exceptions where appropriate.
899
900 Tue May 7 11:47:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
901
902         * StreamReader.cs: return the number of chars read even if we diddn't
903         fill the whole buffer (makes Sergey's ilasm work with mono).
904
905 2002-05-07  Mike Gray     <mikeg_us@hotmail.com> 
906
907         * FileInfo.cs (Create): Implement missing method.
908
909 2002-05-07  Mike Gray     <mikeg_us@hotmail.com>
910
911         * File.cs: Implemented CreateText method, and fixed dst compares
912         to compare against "" instead of null twice.
913
914 2002-05-05  Nick Drochak  <ndrochak@gol.com>
915
916         * StreamReader.cs: Throw exceptions where needed. Changed Null field to
917         use new internal class since null cannot be passed to constructor 
918         anymore. Also, fix a coule of small bugs.
919
920 2002-05-03  Nick Drochak  <ndrochak@gol.com>
921
922         * MemoryStream.cs: Refrain from allocating array until the space is
923         really needed. This fixes a bug in the Length property when the
924         constructor without the byte array is used.
925
926 2002-05-01  Duncan Mak  <duncan@ximian.com>
927
928         * DirectoryNotFoundException.cs (constructor): Added missing
929         serialization constructor.
930
931 2002-04-30  Duncan Mak  <duncan@ximian.com>
932
933         * FileLoadException.cs (constructors): Added missing (string,
934         string) ctor, as well as (string, string, Exception) ctor.
935
936         (Message): Added more info to the error message
937
938         (ToString): Added. We'll need to add the StackTrace stuff when
939         that works.
940
941         * FileShare.cs: Add a missing field, Inheritable.
942         
943         * TextReader.cs: Renamed Synchronised method to Synchronized.
944
945         * TextWriter.cs: Renamed Synchronised method to Synchronized.
946         Renamed protected member coreNewLine to CoreNewLine.
947
948 2002-04-30  Sergey Chaban  <serge@wildwestsoftware.com>
949
950         * BinaryReader.cs: Allocate buffer before its first use.
951         Handle end of stream properly. Methods to read native types
952         (ReadInt* etc.) are little-endian (see Compact Framework docs).
953
954         * BinaryWriter.cs: Store data in little-endian format.
955         Use internal buffer for conversions.
956
957 2002-03-31  Dick Porter  <dick@ximian.com>
958
959         * Directory.cs: Strip out "." and ".." from returned list
960
961         * FileAttributes.cs: Get the right enum values
962
963 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
964
965         * TextWriter.cs (write): added check for null
966
967 2002-03-28  Dan Lewis  <dihlewis@yahoo.co.uk>
968
969         * Directory.cs: Throws DirectoryNotFoundException.
970         * MonoIO.cs: Fixed to work around enum problem.
971
972 2002-03-27  Dan Lewis  <dihlewis@yahoo.co.uk>
973
974         * StreamReader.cs: Implemented ReadLine() and ReadEnd().
975
976 2002-03-27  Dan Lewis  <dihlewis@yahoo.co.uk>
977
978         * Directory.cs, File.cs, FileSystemInfo.cs, FileInfo.cs,
979         DirectoryInfo.cs, Path.cs: Modified to use MonoIO class instead of
980         wrapper and PAL classes.
981
982         * MonoIO.cs, MonoIOStat.cs, MonoIOError.cs: Added.
983
984 2002-03-25  Mike Kestner <mkestner@speakeasy.net>
985
986         * MemoryStream.cs (Read): Fixed bug in exception throw.
987
988 2002-03-24  Mike Kestner <mkestner@speakeasy.net>
989
990         * StreamReader.cs (ReadBuffer): Fix buffer merging bugs.
991
992 2002-03-23  Martin Baulig  <martin@gnome.org>
993
994         * StreamReader.cs: Always do buffered reading, use 4k blocks.
995         (Read (char[], int, int)): Implemented.
996         (DiscardBufferedData): Implemented.
997
998 2002-03-21  Mike Kestner <mkestner@speakeasy.net>
999
1000         * StreamReader.cs : Fill out, add buffering, and use encoding.
1001
1002 2002-03-19  Martin Baulig  <martin@gnome.org>
1003
1004         * StreamWriter.cs (StreamWriter (string)): The default is to override
1005         the file, not to append to it.
1006         (StreamWriter (string path, bool append)): When appending, seek to the
1007         end of the file, otherwise truncate the file to zero length.
1008         (Dispose (bool)): Close the internalStream.
1009         (Flush): Flush the interalStream.
1010         (Write (char[], int, int)): Flush the internalStream in auto-flush-mode.
1011
1012 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
1013
1014         * FileStream.cs: Flush buffer before FileSetLength.
1015
1016 2002-02-28  Miguel de Icaza  <miguel@ximian.com>
1017
1018         * Stream.cs (NullStream): Do not track position, this beast does
1019         nothing in practice.
1020
1021 2002-03-15  Dan Lewis <dihlewis@yahoo.co.uk>
1022
1023         * SearchPattern.cs: New class. Glob matching code for Directory.
1024         * Directory.cs: Changed to use SearchPattern instead of mono_glob_*()
1025
1026 2002/03/15 Nick Drochak <ndrochak@gol.com>
1027
1028         * DirectoryInfo.cs: Fixed the overloaded GetDirectories and GetFiles.
1029         This code seemed to be copied from somewhere, and it was close,
1030         but didn't match the docs.  This was the last bit needed to get
1031         NAnt to compile with our class libs.
1032
1033 2002-03-12  Duncan Mak  <duncan@ximian.com>
1034
1035         * EndOfStreamException.cs:
1036         * FileLoadException.cs:
1037         * FileNotFoundException.cs:
1038         * PathTooLongException.cs: Changed the base classes to IOException
1039         instead of SystemException.
1040
1041         * IOException.cs: Added missing constructors.
1042         
1043 2002-03-07  Nick Drochak  <ndrochak@gol.com>
1044
1045         * FileMode.cs: Docs don't say this should be explicitly derived from
1046         int, so just make it a normal Enum.
1047
1048 2002-03-02  Jason Diamond  <jason@injektilo.org>
1049
1050         * StringReader.cs: Fixed off-by-one error in Peek() and Read().
1051
1052 2002-02-12  Nick Drochak  <ndrochak@gol.com>
1053
1054         * PathTooLongException.cs: put it in the correct namespace
1055         * EndOfStreamException.cs: put it in the correct namespace
1056
1057 Thu Jan 31 17:32:32 CET 2002 Paolo Molaro <lupus@ximian.com>
1058
1059         * Directory.cs: handle opendir() return NULL and absolute filenames.
1060
1061 2002-01-31  Duncan Mak  <duncan@ximian.com>
1062
1063         * FileLoadException.cs:
1064         * FileNotFoundException: Added missing bits for serialization.
1065
1066 Thu Jan 24 17:42:54 CET 2002 Paolo Molaro <lupus@ximian.com>
1067
1068         * Directory.cs: allow directories in GetFiles() mask.
1069
1070 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
1071
1072         * FileInfo.c (CopyTo, MoveTo): Implement.
1073
1074         * FileStream.cs: Add argument checking to the constructor.
1075
1076         * File.cs: Rewrote most of the file.  Implement Copy, Open, Create,
1077         OpenText, OpenWrite, Move.  Made pending methods flagged as MonoTODO. 
1078         
1079         * Directory.cs (Delete): reimplement without using DirectoryInfo.
1080         (Delete): Implement the recursive version.
1081         (GetCreationTime, GetLastWriteTime, GetLastAccessTime): Implement.
1082         (Move): Reimplement.
1083         (getNames): dead code removal.
1084
1085         * Path.cs: define an internal DirectorySeparatorStr that we use in
1086         a few spots.
1087
1088         * Wrapper.cs: Updated to new version.
1089         
1090         * DirectoryInfo (Delete): Implement using the Directory API.
1091
1092         * DirectoryInfo.cs (GetFiles, GetDirectories, GetFileSystemInfos,
1093         Delete, Create, Parent, Exists, MoveTo): Implement. 
1094
1095         * Directory.cs (GetListing): implement new utility function.
1096         (GetDirectories): Implement.
1097         (GetFileSystemEntries): Implement.
1098         (GetFiles): Implement.
1099
1100         * CheckArgument.cs (Path): Do not allow null by default.
1101
1102 Tue Jan 22 22:53:23 CET 2002 Paolo Molaro <lupus@ximian.com>
1103
1104         * DirectoryInfo.cs, FileInfo.cs: do not use Debug from the system
1105         assembly in corlib.
1106
1107 2002-01-20 Nick Drochak  <ndrochak@gol.com>
1108
1109         * SeekOrigin.cs: Added Serializable attribute.
1110
1111 2002-01-19  Duncan Mak  <duncan@ximian.com>
1112
1113         * PathTooLongException.cs: 
1114         * EndOfStreamException.cs: Added to CVS.
1115
1116 Thu Jan 10 12:06:46 MST 2002 Matt Kimball <matt@kimball.net>
1117
1118         * BufferedStream.cs: Initial implemenation.  The synchronous
1119         methods for both reading and writing are implemented.  I'll do the
1120         asynchronous methods in a bit.
1121         
1122 Wed Jan  9 16:04:39 MST 2002 Matt Kimball <matt@kimball.net>
1123
1124         * BinaryWriter.cs: Initial implementation.  And it's all there.
1125
1126         * BinaryReader.cs: The constructor now uses the passed in encoding,
1127         not UTF8 always.
1128
1129 Wed Jan  9 13:54:28 MST 2002 Matt Kimball <matt@kimbal.net>
1130
1131         * BinaryReader.cs: Initial implementation.  I think it's complete.
1132
1133 2002-01-04  Ravi Pratap  <ravi@ximian.com>
1134
1135         * CheckArgument.cs, CheckPermission.cs, Directory.cs: MonoTODO
1136         attribute decorations.
1137
1138         * DirectoryInfo.cs, File.cs, FileInfo.cs, FileSystemInfo.cs,
1139         Path.cs, TextReader.cs, TextWriter.cs : Ditto.
1140
1141         * FileLoadException.cs, FileNotFoundException.cs, StreamReader.cs: 
1142         Ditto.
1143
1144 2001-12-11  Dick Porter  <dick@ximian.com>
1145
1146         * FileStream.cs: Use handles rather than casting file descriptors.
1147         Added Handle property.
1148
1149 Wed Nov 14 16:47:47 CET 2001 Paolo Molaro <lupus@ximian.com>
1150
1151         * CheckPermission.cs: disable ModeAccess() code: it's wrong.
1152         * FileStream.cs: only trow an exception if the read failed in ReadByte().
1153         * StreamReader.cs: implement Peek and Read.
1154         * TextWriter.cs: CLSCompliant updates.
1155
1156 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
1157
1158         * FileNotFoundException.cs: Added some constructors
1159
1160         * Path.cs (GetFullPath): Fixed implementation
1161
1162 Fri Nov 2 18:27:58 CET 2001 Paolo Molaro <lupus@ximian.com>
1163
1164         * DirectoryNotFoundException.cs: implemented.
1165
1166 Tue Sep 25 18:54:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
1167
1168         * File.cs: fix signatures of the Open() and OpenRead() functions
1169         (they are static).
1170
1171 Thu Sep 13 18:04:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
1172
1173         * FileLoadException.cs, FileNotFoundException.cs: added.
1174
1175 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
1176
1177         * TextReader.cs: implemented the Read method
1178
1179         * StreamReader.cs: impl. stubs
1180
1181         * StreamWriter.cs: impl.
1182
1183         * TextWriter.cs: implemented Write and WriteLine methods
1184
1185 Sun Aug 26 23:01:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
1186
1187         * FileAccess.cs, FileMode.cs: change values to be compatible with
1188         the ms ones.
1189         
1190 Sun Aug 26 11:47:56 CEST 2001 Paolo Molaro <lupus@ximian.com>
1191
1192         * IOException.cs: Implemented System.IO.Exception.
1193
1194 2001-07-18  Michael Lambert <michaellambert@email.com>
1195
1196         *SeekOrigin.cs.cs, FileShare.cs, FileMode.cs, FileAccess.cs: Add.
1197
1198 2001-07-19  Marcin Szczepanski <marcins@zipworld.com.au>
1199
1200         * System.IO.MemoryStream.cs: Added.  Had quite a few cases of
1201         "LAMESPEC", but the tests work against the MS implementation so
1202         the major functions are right (ie. Read/Write/Seek).  Some more
1203         tests required for the various constructors and exceptions.
1204
1205 2001-07-16  Marcin Szczepanski <marcins@zipworld.com.au>
1206
1207         * StringReader.cs, StringWriter.cs, TextReader.cs, TextWriter.cs:
1208         New class implemenations.
1209
1210         * StringReaderTest.cs, StringWriterTest.cs: Test suite for the above.