2002-09-15 Miguel de Icaza <miguel@ximian.com>
[mono.git] / mcs / class / corlib / System.IO / ChangeLog
1 2002-09-15  Miguel de Icaza  <miguel@ximian.com>
2
3         * FileStream.cs (Dispose): Call FlushBuffer(), and not Flush, as
4         Flush calls fsync().  
5
6         The API docs show no explicit mention that Flush() should even do
7         an fsync, I am thinking that we should drop that from the
8         runtime. 
9
10 2002-09-09  Miguel de Icaza  <miguel@ximian.com>
11
12         * StreamWriter.cs: When no encoding is provided, create an
13         encoding without markers, this is what MS does.
14
15 2002-09-06  Miguel de Icaza  <miguel@ximian.com>
16
17         * StreamReader.cs: Implement detection of byte marks and skipping
18         of byte marks at the beginning of the stream.
19
20         (ReadToEnd): Use buffered read instead of char-by-char
21         processing. 
22
23         Correct the default arguments for creating the StreamReader.
24
25 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26
27         * CheckArgument.cs: fixed check for empty string.
28         * Path.cs: various fixes. It passes all the tests in new PathTest.
29
30 2002-08-29  Duncan Mak  <duncan@ximian.com>
31
32         * StreamWriter.cs: Set DisposedAlready after calling flush. Fixes
33         the build for gtk#.
34
35 2002-08-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
36
37         * BinaryReader.cs:
38         * BinaryWriter.cs:
39         * MemoryStream.cs:
40         * StreamReader.cs:
41         * StreamWriter.cs:
42         * StringReader.cs:
43         * StringWriter.cs:
44         * TextWriter.cs: IDisposable fixes.
45
46 2002-08-24  Miguel de Icaza  <miguel@ximian.com>
47
48         * StreamReader.cs: Removed TODOs, as the code seems to be
49         complete. 
50
51         * Path.cs (GetTempFileName): Make this routine atomic by not
52         testing and then creating, but using the create call to ensure
53         that we own the filename.
54
55 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
56
57         * FileLoadException.cs: implemented ToString.
58
59         * StreamWriter.cs: added Null field and implemented Write (char) and
60         Write (char []).
61
62 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
63
64         * StreamReader.cs: implemented NullStreamReader.
65
66 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
67
68         * Path.cs (GetDirectoryName): Fix for filenames with size = 1
69
70         * File.cs: Removed all references that threw exceptions when the
71         paths contains a colon, as this is a valid part of an identifier
72         on Unix.
73
74         Everywhere: The String.Empty return from GetDirectoryName means
75         that there is no directory information about the path.
76
77 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
78
79         * FileNotFoundException.cs: use Message and InnerException from base
80         class. Changed Message and ToString ().
81
82 2002-08-19  Dick Porter  <dick@ximian.com>
83
84         * BinaryWriter.cs: The length of a string is counted in bytes, not
85         chars
86
87 2002-08-18  Dick Porter  <dick@ximian.com>
88
89         * BinaryReader.cs: Fixed buffering
90
91 2002-08-09  Nick Drochak  <ndrochak@gol.com>
92
93         * BinaryReader.cs: added virtual to Dispose(bool).
94
95 2002-08-03  Jason Diamond  <jason@injektilo.org>
96
97         * StringWriter.cs: Return UnicodeEncoding for Encoding property.
98
99 2002-08-03  Jason Diamond  <jason@injektilo.org>
100
101         * StreamWriter.cs: Use GetByteCount() to get exact length instead
102         of GetMaxByteCount when converting chars to bytes.
103
104 2002-07-31  Duncan Mak  <duncan@ximian.com>
105
106         * StreamReader.cs: 
107         (Dispose): Added and implmented.
108
109         * StreamWriter.cs: 
110         (Dispose): Fixed visibility.
111         (Initialize): Fixed visibility, made internal.
112
113         * BinaryReader.cs:
114         (Dispose): Fixed visibility.
115
116 2002-07-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
117
118         * File.cs:
119         (Create): allow file names without path.
120
121 Fri Jul 26 15:45:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
122
123         * FileStream.cs: patch from erik@bagfors.nu to add
124         Name property support.
125
126 2002-07-20  Dick Porter  <dick@ximian.com>
127
128         * MonoIO.cs: Added icall to CreatePipe
129
130 2002-07-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
131
132         * FileInfo.cs: fixes buglet #27940
133
134 2002-07-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
135
136         * Path.cs: removed unneeded line from GetExtension.
137
138 2002-07-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
139
140         * FileStream.cs:
141         (.ctor): call MonoIO.GetException with the file name.
142
143 2002-07-02  Mike Kestner  <mkestner@speakeasy.net>
144
145         * StreamReader.cs: Guard against ^\n lines as pointed out by Gonzalo.
146
147 2002-07-02  Mike Kestner  <mkestner@speakeasy.net>
148
149         * StreamReader.cs: Revert the last Peek change and fix the ReadLine
150         end of line detection code instead.
151
152 2002-07-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
153
154         * StreamReader.cs:
155         (Peek): no need to have seek capabilitites. 
156
157 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
158
159         * Path.cs (ChangeExtension): handle some special cases (fixes bug #25319)
160
161         * File.cs (Delete): only call Directory.Exists() if DirName != ""
162
163 2002-06-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
164
165         * Directory.cs: fixed bug #26133 and also test if the directory exist
166         before performing the search.
167
168 2002-06-12  Nick Drochak  <ndrochak@gol.com>
169
170         * StringReader.cs (ReadLine): Return null when we get to end of the
171         string.
172
173 2002-05-22  Lawrence Pit  <loz@cable.a2000.nl>
174
175         * StreamWriter.cs: added ability to write null value
176         
177 2002-05-19  Lawrence Pit  <loz@cable.a2000.nl>
178
179         * Stream.cs: NullStream.ReadByte now returns -1 instead of 0 to
180         prevent endless loops.
181
182 2002-05-17  Dan Lewis  <dihlewis@yahoo.co.uk>
183
184         * FileStream.cs: Enforce lower bound on buffer size.
185
186 2002-05-16  Piers Haken <piersh@friskit.com>
187
188         * Stream.cs: Implement synchronous {Begin|End}{Read|Write}() methods.
189
190 2002-05-17  Nick Drochak  <ndrochak@gol.com>
191
192         * StreamWriter.cs: Implement buffering.  Also implemented dispose
193         pattern as recommended by the MS docs.  Must call Close() now
194         to ensure the buffer is flushed.
195
196 2002-05-15  Nick Drochak  <ndrochak@gol.com>
197
198         * Path.cs (GetDirectoryName): Return String.Empty if there is no
199         directory
200
201         * StreamReader.cs: Add some parameter checking on file names.
202
203         * StreamWriter.cs: Add some parameter checking on file names.
204
205 2002-05-14 Nick Drochak  <ndrochak@gol.com>
206
207         * File.cs: Add parameter checks to most methods. Not completely done,
208         but all current unit tests pass.
209
210         * Path.cs: Implement GetTempFileName().
211
212 2002-05-10  Nick Drochak  <ndrochak@gol.com>
213
214         * StreamWriter.cs (Flush): Throw proper exception if internal stream
215         has already been closed when we try to flush.
216
217 2002/05/10  Nick Drochak <ndrochak@gol.com>
218
219         * FileNotFoundException.cs (ToString): Don't try to use the inner
220         exception, because it might be null.  Use the message instead.
221
222 2002-05-09  Nick Drochak  <ndrochak@gol.com>
223
224         * File.cs (Delete): Do not throw an exception if the file does not
225         exist.
226
227 2002-05-08  Mike Gray     <mikeg@mikegray.org>
228
229         * File.cs: According to ECMA spec and MS docs Copy(src, dest)
230         should not overwrite dest by default.
231
232 2002-05-08  Nick Drochak  <ndrochak@gol.com>
233
234         * StreamWriter.cs: Add paramter check to constructors and throw
235         exceptions where appropriate.
236
237 Tue May 7 11:47:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
238
239         * StreamReader.cs: return the number of chars read even if we diddn't
240         fill the whole buffer (makes Sergey's ilasm work with mono).
241
242 2002-05-07  Mike Gray     <mikeg_us@hotmail.com> 
243
244         * FileInfo.cs (Create): Implement missing method.
245
246 2002-05-07  Mike Gray     <mikeg_us@hotmail.com>
247
248         * File.cs: Implemented CreateText method, and fixed dst compares
249         to compare against "" instead of null twice.
250
251 2002-05-05  Nick Drochak  <ndrochak@gol.com>
252
253         * StreamReader.cs: Throw exceptions where needed. Changed Null field to
254         use new internal class since null cannot be passed to constructor 
255         anymore. Also, fix a coule of small bugs.
256
257 2002-05-03  Nick Drochak  <ndrochak@gol.com>
258
259         * MemoryStream.cs: Refrain from allocating array until the space is
260         really needed. This fixes a bug in the Length property when the
261         constructor without the byte array is used.
262
263 2002-05-01  Duncan Mak  <duncan@ximian.com>
264
265         * DirectoryNotFoundException.cs (constructor): Added missing
266         serialization constructor.
267
268 2002-04-30  Duncan Mak  <duncan@ximian.com>
269
270         * FileLoadException.cs (constructors): Added missing (string,
271         string) ctor, as well as (string, string, Exception) ctor.
272
273         (Message): Added more info to the error message
274
275         (ToString): Added. We'll need to add the StackTrace stuff when
276         that works.
277
278         * FileShare.cs: Add a missing field, Inheritable.
279         
280         * TextReader.cs: Renamed Synchronised method to Synchronized.
281
282         * TextWriter.cs: Renamed Synchronised method to Synchronized.
283         Renamed protected member coreNewLine to CoreNewLine.
284
285 2002-04-30  Sergey Chaban  <serge@wildwestsoftware.com>
286
287         * BinaryReader.cs: Allocate buffer before its first use.
288         Handle end of stream properly. Methods to read native types
289         (ReadInt* etc.) are little-endian (see Compact Framework docs).
290
291         * BinaryWriter.cs: Store data in little-endian format.
292         Use internal buffer for conversions.
293
294 2002-03-31  Dick Porter  <dick@ximian.com>
295
296         * Directory.cs: Strip out "." and ".." from returned list
297
298         * FileAttributes.cs: Get the right enum values
299
300 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
301
302         * TextWriter.cs (write): added check for null
303
304 2002-03-28  Dan Lewis  <dihlewis@yahoo.co.uk>
305
306         * Directory.cs: Throws DirectoryNotFoundException.
307         * MonoIO.cs: Fixed to work around enum problem.
308
309 2002-03-27  Dan Lewis  <dihlewis@yahoo.co.uk>
310
311         * StreamReader.cs: Implemented ReadLine() and ReadEnd().
312
313 2002-03-27  Dan Lewis  <dihlewis@yahoo.co.uk>
314
315         * Directory.cs, File.cs, FileSystemInfo.cs, FileInfo.cs,
316         DirectoryInfo.cs, Path.cs: Modified to use MonoIO class instead of
317         wrapper and PAL classes.
318
319         * MonoIO.cs, MonoIOStat.cs, MonoIOError.cs: Added.
320
321 2002-03-25  Mike Kestner <mkestner@speakeasy.net>
322
323         * MemoryStream.cs (Read): Fixed bug in exception throw.
324
325 2002-03-24  Mike Kestner <mkestner@speakeasy.net>
326
327         * StreamReader.cs (ReadBuffer): Fix buffer merging bugs.
328
329 2002-03-23  Martin Baulig  <martin@gnome.org>
330
331         * StreamReader.cs: Always do buffered reading, use 4k blocks.
332         (Read (char[], int, int)): Implemented.
333         (DiscardBufferedData): Implemented.
334
335 2002-03-21  Mike Kestner <mkestner@speakeasy.net>
336
337         * StreamReader.cs : Fill out, add buffering, and use encoding.
338
339 2002-03-19  Martin Baulig  <martin@gnome.org>
340
341         * StreamWriter.cs (StreamWriter (string)): The default is to override
342         the file, not to append to it.
343         (StreamWriter (string path, bool append)): When appending, seek to the
344         end of the file, otherwise truncate the file to zero length.
345         (Dispose (bool)): Close the internalStream.
346         (Flush): Flush the interalStream.
347         (Write (char[], int, int)): Flush the internalStream in auto-flush-mode.
348
349 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
350
351         * FileStream.cs: Flush buffer before FileSetLength.
352
353 2002-02-28  Miguel de Icaza  <miguel@ximian.com>
354
355         * Stream.cs (NullStream): Do not track position, this beast does
356         nothing in practice.
357
358 2002-03-15  Dan Lewis <dihlewis@yahoo.co.uk>
359
360         * SearchPattern.cs: New class. Glob matching code for Directory.
361         * Directory.cs: Changed to use SearchPattern instead of mono_glob_*()
362
363 2002/03/15 Nick Drochak <ndrochak@gol.com>
364
365         * DirectoryInfo.cs: Fixed the overloaded GetDirectories and GetFiles.
366         This code seemed to be copied from somewhere, and it was close,
367         but didn't match the docs.  This was the last bit needed to get
368         NAnt to compile with our class libs.
369
370 2002-03-12  Duncan Mak  <duncan@ximian.com>
371
372         * EndOfStreamException.cs:
373         * FileLoadException.cs:
374         * FileNotFoundException.cs:
375         * PathTooLongException.cs: Changed the base classes to IOException
376         instead of SystemException.
377
378         * IOException.cs: Added missing constructors.
379         
380 2002-03-07  Nick Drochak  <ndrochak@gol.com>
381
382         * FileMode.cs: Docs don't say this should be explicitly derived from
383         int, so just make it a normal Enum.
384
385 2002-03-02  Jason Diamond  <jason@injektilo.org>
386
387         * StringReader.cs: Fixed off-by-one error in Peek() and Read().
388
389 2002-02-12  Nick Drochak  <ndrochak@gol.com>
390
391         * PathTooLongException.cs: put it in the correct namespace
392         * EndOfStreamException.cs: put it in the correct namespace
393
394 Thu Jan 31 17:32:32 CET 2002 Paolo Molaro <lupus@ximian.com>
395
396         * Directory.cs: handle opendir() return NULL and absolute filenames.
397
398 2002-01-31  Duncan Mak  <duncan@ximian.com>
399
400         * FileLoadException.cs:
401         * FileNotFoundException: Added missing bits for serialization.
402
403 Thu Jan 24 17:42:54 CET 2002 Paolo Molaro <lupus@ximian.com>
404
405         * Directory.cs: allow directories in GetFiles() mask.
406
407 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
408
409         * FileInfo.c (CopyTo, MoveTo): Implement.
410
411         * FileStream.cs: Add argument checking to the constructor.
412
413         * File.cs: Rewrote most of the file.  Implement Copy, Open, Create,
414         OpenText, OpenWrite, Move.  Made pending methods flagged as MonoTODO. 
415         
416         * Directory.cs (Delete): reimplement without using DirectoryInfo.
417         (Delete): Implement the recursive version.
418         (GetCreationTime, GetLastWriteTime, GetLastAccessTime): Implement.
419         (Move): Reimplement.
420         (getNames): dead code removal.
421
422         * Path.cs: define an internal DirectorySeparatorStr that we use in
423         a few spots.
424
425         * Wrapper.cs: Updated to new version.
426         
427         * DirectoryInfo (Delete): Implement using the Directory API.
428
429         * DirectoryInfo.cs (GetFiles, GetDirectories, GetFileSystemInfos,
430         Delete, Create, Parent, Exists, MoveTo): Implement. 
431
432         * Directory.cs (GetListing): implement new utility function.
433         (GetDirectories): Implement.
434         (GetFileSystemEntries): Implement.
435         (GetFiles): Implement.
436
437         * CheckArgument.cs (Path): Do not allow null by default.
438
439 Tue Jan 22 22:53:23 CET 2002 Paolo Molaro <lupus@ximian.com>
440
441         * DirectoryInfo.cs, FileInfo.cs: do not use Debug from the system
442         assembly in corlib.
443
444 2002-01-20 Nick Drochak  <ndrochak@gol.com>
445
446         * SeekOrigin.cs: Added Serializable attribute.
447
448 2002-01-19  Duncan Mak  <duncan@ximian.com>
449
450         * PathTooLongException.cs: 
451         * EndOfStreamException.cs: Added to CVS.
452
453 Thu Jan 10 12:06:46 MST 2002 Matt Kimball <matt@kimball.net>
454
455         * BufferedStream.cs: Initial implemenation.  The synchronous
456         methods for both reading and writing are implemented.  I'll do the
457         asynchronous methods in a bit.
458         
459 Wed Jan  9 16:04:39 MST 2002 Matt Kimball <matt@kimball.net>
460
461         * BinaryWriter.cs: Initial implementation.  And it's all there.
462
463         * BinaryReader.cs: The constructor now uses the passed in encoding,
464         not UTF8 always.
465
466 Wed Jan  9 13:54:28 MST 2002 Matt Kimball <matt@kimbal.net>
467
468         * BinaryReader.cs: Initial implementation.  I think it's complete.
469
470 2002-01-04  Ravi Pratap  <ravi@ximian.com>
471
472         * CheckArgument.cs, CheckPermission.cs, Directory.cs: MonoTODO
473         attribute decorations.
474
475         * DirectoryInfo.cs, File.cs, FileInfo.cs, FileSystemInfo.cs,
476         Path.cs, TextReader.cs, TextWriter.cs : Ditto.
477
478         * FileLoadException.cs, FileNotFoundException.cs, StreamReader.cs: 
479         Ditto.
480
481 2001-12-11  Dick Porter  <dick@ximian.com>
482
483         * FileStream.cs: Use handles rather than casting file descriptors.
484         Added Handle property.
485
486 Wed Nov 14 16:47:47 CET 2001 Paolo Molaro <lupus@ximian.com>
487
488         * CheckPermission.cs: disable ModeAccess() code: it's wrong.
489         * FileStream.cs: only trow an exception if the read failed in ReadByte().
490         * StreamReader.cs: implement Peek and Read.
491         * TextWriter.cs: CLSCompliant updates.
492
493 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
494
495         * FileNotFoundException.cs: Added some constructors
496
497         * Path.cs (GetFullPath): Fixed implementation
498
499 Fri Nov 2 18:27:58 CET 2001 Paolo Molaro <lupus@ximian.com>
500
501         * DirectoryNotFoundException.cs: implemented.
502
503 Tue Sep 25 18:54:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
504
505         * File.cs: fix signatures of the Open() and OpenRead() functions
506         (they are static).
507
508 Thu Sep 13 18:04:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
509
510         * FileLoadException.cs, FileNotFoundException.cs: added.
511
512 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
513
514         * TextReader.cs: implemented the Read method
515
516         * StreamReader.cs: impl. stubs
517
518         * StreamWriter.cs: impl.
519
520         * TextWriter.cs: implemented Write and WriteLine methods
521
522 Sun Aug 26 23:01:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
523
524         * FileAccess.cs, FileMode.cs: change values to be compatible with
525         the ms ones.
526         
527 Sun Aug 26 11:47:56 CEST 2001 Paolo Molaro <lupus@ximian.com>
528
529         * IOException.cs: Implemented System.IO.Exception.
530
531 2001-07-18  Michael Lambert <michaellambert@email.com>
532
533         *SeekOrigin.cs.cs, FileShare.cs, FileMode.cs, FileAccess.cs: Add.
534
535 2001-07-19  Marcin Szczepanski <marcins@zipworld.com.au>
536
537         * System.IO.MemoryStream.cs: Added.  Had quite a few cases of
538         "LAMESPEC", but the tests work against the MS implementation so
539         the major functions are right (ie. Read/Write/Seek).  Some more
540         tests required for the various constructors and exceptions.
541
542 2001-07-16  Marcin Szczepanski <marcins@zipworld.com.au>
543
544         * StringReader.cs, StringWriter.cs, TextReader.cs, TextWriter.cs:
545         New class implemenations.
546
547         * StringReaderTest.cs, StringWriterTest.cs: Test suite for the above.
548