1 2008-05-07 Sebastien Pouliot <sebastien@ximian.com>
3 * CheckArgument.cs: Removed. Lots of unused code. The two methods
4 used are now inlined into Path.cs
5 * CheckPermission.cs: Removed. Lots of unused code.
6 * Path.cs: Inlined two checks.
9 2008-04-18 Sebastien Pouliot <sebastien@ximian.com>
11 * Path.cs: Change PathSeparatorChars from private to internal since
12 it's needed for IsolatedStorage.
14 2008-04-17 Gert Driesen <drieseng@users.sourceforge.net>
16 * DirectoryInfo.cs: Added new internal ctor, which takes a bool that
17 indicates whether the original path should only container the last
18 part of the directory. Moved logic for determining the Name and
19 Parent to Initialize method, to allow it to be re-used on
20 deserialization. Renamed argument names to fix corcompare issues.
21 Added missing argument checks.
22 * Directory.cs (CreateDirectoriesInternal): Use internal ctor for
23 DirectoryInfo to ensure OriginalPath only contains last part of
25 * File.cs: Removed redundant checks from Create. On 2.0 profile, pass
26 FileOptions to FileStream. Removed redundant directory check from
27 Delete and modified exceptions to more closely match MS.
28 * FileInfo.cs: Added argument check to ctor to match MS. Added missing
29 deserialization ctor. Modified argument checks in MoveTo, and removed
30 redundant checks. Added missing argument checks in CopyTo. Code
32 * FileSystemInfo.cs: Modified argument checks in CheckPath to more
34 * MonoIO.cs: Added msg that does not disclose filename for
36 * Path.cs: Use String.Length instead of comparing with String.Empty.
37 Removed exceptions argument names to match MS.
39 2008-04-16 Gert Driesen <drieseng@users.sourceforge.net>
41 * File.cs: Changed argument names and thrown exception to better match
42 .NET. Use String.Length instead of comparison with empty string.
43 * DirectoryInfo.cs: Added missing deserialization ctor.
45 2008-04-04 Dick Porter <dick@ximian.com>
47 * File.cs: Pretty up the file share exception with the path name.
49 2008-03-28 Sebastien Pouliot <sebastien@ximian.com>
51 * Directory.cs: Exception differs when deleting a directory if it
52 does not exists or if a file of the same name exists. Also don't
53 include path in exception if Delete fails.
55 2008-03-20 Marek Safar <marek.safar@gmail.com>
57 * Path.cs (Combine): Call ToString to optimize concatenation.
59 2008-03-02 Gert Driesen <drieseng@users.sourceforge.net>
61 * DriveInfo.cs: Removed debug code.
63 2008-02-15 Miguel de Icaza <miguel@novell.com>
65 * UnmanagedMemoryStream.cs: Implement few missing pieces.
67 2008-02-10 Zoltan Varga <vargaz@gmail.com>
69 * UnexceptionalStreamReader.cs (Read): Optimize this to avoid making a number of
70 calls + creation of a string for each character read.
72 2008-02-03 Sebastien Pouliot <sebastien@ximian.com>
74 * MemoryStream.cs: Remove unused code found by Gendarme.
76 2008-01-16 Zoltan Varga <vargaz@gmail.com>
78 * BinaryReader.cs: Fix ReadCharBytes method to avoid non-linear behavior.
81 2007-12-28 Zoltan Varga <vargaz@gmail.com>
83 * MemoryStream.cs: Fix crash if internalBuffer is null. Avoid calling
84 unsafe icalls. Fixes #350860.
86 2007-11-21 Atsushi Enomoto <atsushi@ximian.com>
88 * FileStream.cs : Close() does not exist in 2.0 (Stream does).
89 Move GC.SuppressFinalize() to Dispose(true).
91 2007-11-12 Juraj Skripsky <js@hotfeet.ch>
93 * Path.cs (GetRandomFileName): Return filenames containing only
94 characters from the range [a..z0..9] as MS.NET does.
96 2007-11-02 Atsushi Enomoto <atsushi@ximian.com>
98 * StreamReader.cs : Encoding.GetMaxCharCount() does not always return
99 the maximum max char count for Decoder.GetChars() since it might
100 contain pending buffer by flush. Fixed bug #338370.
102 2007-11-01 Miguel de Icaza <miguel@novell.com>
104 * Path.cs (GetDirectoryName): The paths returned from this routine
105 should be canonical, not just a substring. In addition to fixing
106 this, it also fixes #324742.
108 2007-10-26 Atsushi Enomoto <atsushi@ximian.com>
110 * BinaryReader.cs, BinaryWriter.cs : use unsafe encoding that has ""
111 for replacement fallback. Binary serialization regression is fixed.
113 2007-09-06 Atsushi Enomoto <atsushi@ximian.com>
115 * Stream.cs, BufferedStream.cs, MemoryStream.cs: in 2.0 override
116 Dispose(bool) rather than Close().
117 Stream.Dispose() is virtual in 2.0.
119 2007-08-24 Gert Driesen <drieseng@users.sourceforge.net>
121 * BinaryReader.cs: Fixed line endings.
122 * FileStream.cs: Rename name argument to path. Spaces to tabs.
124 2007-08-20 William Holmes <billholmes54@gmail.com>
126 *File.cs: Add implementation for IO.File.Replace methods.
127 *MonoIO.cs: Declared an internal call for ReplaceFile
129 Code is contributed under MIT/X11 license.
131 2007-07-31 Dick Porter <dick@ximian.com>
133 * MonoIO.cs: Fix formatting of 'access denied' exception when the
134 path info isn't known. Fixes bug 82141.
136 2007-07-08 Gert Driesen <drieseng@users.sourceforge.net>
138 * Directory.cs: Renamed Move arguments to match MS. Allow Move to be
139 used to move files, patch by Robert Jordan. Fixes bug #81912. Spaces
142 2007-06-21 Dick Porter <dick@ximian.com>
144 * FileStream.cs: Fix FileShare test, fixing better bug 79250.
146 2007-05-28 Atsushi Enomoto <atsushi@ximian.com>
148 * UnmanagedMemoryStream.cs : added Closed event for sys.Resources use.
149 * IntPtrStream.cs : added internal get_BaseAddress(), for the same.
151 2007-05-25 Gert Driesen <drieseng@users.sourceforge.net>
153 * UnmanagedMemoryStream.cs: In Read and ReadByte, use Marshal.ReadByte
154 to read bytes as this allows us to start reading from the current
155 position. In Read, return 0 when reading beyond the end of the stream
156 and only read bytes until the end of the stream (not capacity).
157 In ReadByte, return -1 when reading beyond the end of the stream.
158 In SetLength: changed argument validation (and reported exceptions) to
159 match MS, removed duplicate access check and changed the current
160 position if length is less than position. In Write: throw
161 NotSupportedException when attempting to write beyond capacity, use
162 Marshal.WriteByte since that allows us to start writing from the
163 current position. Adjust length when position moves beyond length
164 in both Write and WriteByte. Allow position to be moved beyond
165 capacity of stream. Fixed position using Seek (=+ typo). Changed
166 CanRead to ignore current position. Allow Position to be used to move
167 beyond capacity of stream.
169 2007-05-24 Gert Driesen <drieseng@users.sourceforge.net>
171 * UnmanagedMemoryStream.cs: Changed argument names and exceptions
172 (msg, params) to match MS. Verify access argument in ctor.
174 2007-05-23 Atsushi Enomoto <atsushi@ximian.com>
176 * UnmanagedMemoryStream.cs : couple of bugfixes. in Read(), don't
177 return buffer beyond the requested length. Fixed .ctor() for wrong
178 capacity initialization.
180 2007-05-12 Jonathan Chambers <joncham@gmail.com>
182 * FileStream.cs: Implement SafeHandle constructors.
184 2007-05-01 Dick Porter <dick@ximian.com>
187 * Stream.cs: Missed a few 2.0 methods
189 2007-04-30 Dick Porter <dick@ximian.com>
193 * DirectoryNotFoundException.cs:
204 * UnmanagedMemoryStream.cs:
207 * FileLoadException.cs:
214 * EndOfStreamException.cs:
217 * PathTooLongException.cs:
219 * FileNotFoundException.cs: 2.0 profile updates
221 2007-04-21 Alp Toker <alp@atoker.com>
223 * FileStream.cs: Respect request for buffering in all cases.
225 Gonzalo added code in r42667 that disables buffering even when it is
226 requested, in the case that ftype != MonoFileType.Disk. This was
227 killing performance for users who do Console.OpenStandardOutput(1024)
228 but were ending up with a non-buffered FileStream.
230 The new behaviour appears correct but we should watch for any
233 2007-04-05 Dick Porter <dick@ximian.com>
235 * Directory.cs: Pass combined path and pattern to
236 MonoIO.GetFileSystemEntries()
238 2007-04-03 Alp Toker <alp@atoker.com>
240 * UnmanagedMemoryStream.cs: Should not have a public Dispose().
241 This behaviour is already provided by the base class.
243 2007-04-03 Alp Toker <alp@atoker.com>
245 * Stream.cs: CreateWaitHandle() obsolete in 2.0.
247 2007-03-18 Alp Toker <alp@atoker.com>
249 * UnmanagedMemoryStream.cs:
250 * Directory.cs: Exception message typo fixes.
252 2007-03-11 Zoltan Varga <vargaz@gmail.com>
254 * UnmanagedMemoryStream.cs: Fix a warning.
256 2007-03-05 Miguel de Icaza <miguel@novell.com>
258 * Path.cs: Manually call FileStream and pass the new internal
259 FileOptions.1 flag that means "This is a temporary file, use 600
262 * FileOptions.cs: Document the new private enum value.
264 2007-02-22 Dick Porter <dick@ximian.com>
267 * MonoIO.cs: Handle ERROR_CANNOT_MAKE.
269 2007-02-19 Eyal Alaluf <eyala@mainsoft.com>
271 * DirectoryInfo.cs, Directory.cs: Use MonoNotSupported & MonoLimitation
272 attribute to tag that DirectorySecurity is not supported.
274 2007-02-19 Boris Kirzner <borisk@mainsoft.com>
276 * Path.cs: fix order of InvalidPathChars on windows.
278 2007-01-31 Gert Driesen <drieseng@users.sourceforge.net>
280 * StreamReader.cs: Removed checks for non-existing directory or file,
281 since these checks are also performed in FileStream.
283 2007-01-31 Gert Driesen <drieseng@users.sourceforge.net>
285 * FileStream.cs: Always resolve to absolute paths for exceptions, when not
288 2007-01-24 Gonzalo Paniagua Javier <gonzalo.mono@gmail.com>
290 * StreamReader.cs: fix for bug #75526. We return earlier from Read () if
291 the underlying stream might block or end on the next read.
293 2007-01-22 Miguel de Icaza <miguel@novell.com>
295 * DirectoryInfo.cs: Throw a better exception (accorind go the
296 docs, UnauthorizedAccessException is thrown if the underlying
297 platform does not support it and *also* if there are no
298 permissions to access it, which is more convenient than the
299 PlatformNotSupportedException that only states that it needs Win2k
302 2006-12-23 Alp Toker <alp@atoker.com>
304 * Directory.cs: "platfor" typofix
306 2006-12-22 Sebastien Pouliot <sebastien@ximian.com>
308 * File.cs: Add stubs for Encrypt and Decrypt that throws
309 NotSupportedException just like non-NTFS file systems would with MS.
310 Remove nested #if NET_2_0.
311 * FileInfo.cs: Add stubs for Encrypt and Decrypt that throws
312 NotSupportedException just like non-NTFS file systems would with MS.
314 2006-12-22 Atsushi Enomoto <atsushi@ximian.com>
316 * Directory.cs : non NET_2_0 build fix.
318 2006-12-15 Miguel de Icaza <miguel@novell.com>
320 * FileInfo.cs: Empty implementations for Encrypt and Decrypt
322 Mon Dec 11 11:40:06 CET 2006 Paolo Molaro <lupus@ximian.com>
324 * FileStream.cs: correct exception message patch from
325 Markus Mauhart <mmauhart@chello.at>.
327 2006-11-28 Duncan Mak <duncan@novell.com>
329 * TextReader.cs (Dispose): Expose as public in NET_2_0.
331 2006-11-26 Miguel de Icaza <miguel@novell.com>
333 * DriveInfo.cs, DriveType.cs: Add a couple of classes for
336 Thanks MoMA! http://www.mono-project.com/Moma
338 2006-11-16 Miguel de Icaza <miguel@novell.com>
340 * DirectoryInfo.cs (GetFiles): Implement option with SearchOptions
343 2006-11-13 Dick Porter <dick@ximian.com>
345 * Directory.cs: Don't follow symlinks when deleting directories.
346 Keeps bug 79733 fixed while fixing bug 79887.
348 * MonoIO.cs: ExistsSymlink() added, which checks for
349 FileAttributes.ReparsePoint.
351 2006-11-07 Dick Porter <dick@ximian.com>
353 * Directory.cs: CreateDirectory() should only throw IOException in
354 the 2.0 profile if a file already exists with the same name, not a
357 2006-11-03 Jensen Somers <jensen.somers@gmail.com>
359 * Directory.cs: CreateDirectory() should throw IOException if a
360 file or directory with the same name already exists, in the 2.0
361 profile. Fixes bug 79806.
363 2006-10-30 Joel Reed <joel.reed@ddiworld.com>
365 * DirectoryInfo.cs: Implement SearchOption.AllDirectories option.
367 2006-10-11 Dick Porter <dick@ximian.com>
369 * FileStream.cs: Cope with 2.0 FileShare.Delete values. Patch by
370 Peter Dettman <peter.dettman@iinet.net.au> fixing bug 79250.
372 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
374 * FileInfo.cs: added 2.0 IsReadOnly. Patch by Joel Reed.
376 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
378 * FileInfo.cs: eol-style.
380 2006-09-19 Gert Driesen <drieseng@users.sourceforge.net>
382 * FileNotFoundException.cs: Changed message for default ctor to match
383 MS. Use internal message field of Exception to check whether Message
384 is null. On 2.0 profile, use file/assembly load failure message when
385 no message is set and a filename was specified. On 1.0 profile,
386 always use file/assembly load failure message when no message is set
387 (regardless of whether a filename was specified or not). Made some
388 cosmetic changes to ToString to have it match MS.
390 2006-09-02 Zoltan Varga <vargaz@gmail.com>
392 * BinaryReader.cs (Read): Avoid allocating memory when reading a char.
394 2006-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
396 * StreamReader.cs: avoid ArgumentOutRangeException when the underlying
397 stream returns -1 on Read.
399 2006-08-30 Lluis Sanchez Gual <lluis@novell.com>
401 * FileInfo.cs: OpenRead should open the file using the Read share mode.
403 2006-08-21 Sebastien Pouliot <sebastien@ximian.com>
405 * Path.cs: Added internal method IsPathSubsetOf required to implement
406 correctly FileIOPermission (better located here).
408 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
410 * File.cs: (Delete) avoid creating the exception object for the 'file
413 2006-07-24 Miguel de Icaza <miguel@novell.com>
415 * FileShare.cs: Add Delete in 2.0
417 2006-07-06 Dick Porter <dick@ximian.com>
419 * Directory.cs: When creating a directory treat ERROR_FILE_EXISTS
420 (ie a file already exists with that name) the same as
421 ERROR_ALREADY_EXISTS (ie a directory already exists with that
422 name.) Keeps bug 50753 fixed when I fix the io-layer
423 CreateDirectory() behaviour.
425 2006-06-21 Atsushi Enomoto <atsushi@ximian.com>
427 * Directory.cs : implemented GetFiles() and GetDirectories() which
428 takes SearchOption (as they are used in one of ruby.net stuff).
430 2006-06-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
432 * File.cs: never throw in Exists.
434 2006-05-18 Miguel de Icaza <miguel@novell.com>
436 * Directory.cs (Exists): Ignore INVALID_HANDlE, return false.
438 2006-06-03 John Luke <john.luke@gmail.com>
440 * Path.cs: fix typo in [Obsolete] message
442 2006-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
444 * BinaryReader.cs: use BlockCopyInternal.
446 2006-05-01 Daniel Drake <dsd@gentoo.org>
448 * Directory.cs: Return false (as documented) on ERROR_ACCESS_DENIED in
449 Exists() rather than throwing an exception. Bug #78239.
451 2006-04-29 Atsushi Enomoto <atsushi@ximian.com>
453 * UnexceptionalStreamReader.cs (Read): Fix for #78218, where we
454 consumed characters from the input even when the count was not set
455 to zero, causing some characters to be missing in some
458 2006-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
460 * Directory.cs: make sure the parent directory is not an empty string
461 when a file name with no path is provided. Fixes bug #78209. Patch by
464 2006-04-28 Atsushi Enomoto <atsushi@ximian.com>
466 * StreamReader.cs : implemented EndOfStream property.
467 * File.cs : implemented AppendAllText(), WriteAllLines(),
468 WriteAllBytes() and ReadAllLines(). Bug #77813 fixed.
470 2006-04-28 Robert Jordan <robertj@gmx.net>
472 * Path.cs (GetPathRoot): Return just the \\server\share
473 part of a UNC. Fixes #78147.
476 2006-04-26 Miguel de Icaza <miguel@novell.com>
478 * FileStream.cs: Implement the FileOptions usage by passing all
479 the information to the C layer. Remove the "isAsync" argument for
480 MonoIO.Open, and instead pass it on the FileOptions.
482 * FileOptions.cs: Make it build when including WriteThrough
484 * MonoIO.cs: Update MonoIO.Open signature to drop the async
485 argument and take FileOptions instead.
487 2006-04-21 Zoltan Varga <vargaz@gmail.com>
489 * FileStream.cs: Add new net 2.0 ctor.
491 * FileOptions.cs: New file.
493 2006-03-21 Miguel de Icaza <miguel@novell.com>
495 * Stream.cs: In 2.0 make Close call Dispose(true).
497 2006-03-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
499 * FileStream.cs: Seek() should flush the buffer, if any. Fixes bug
502 2006-03-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
504 * Stream.cs: Add 2.0 members to Stream.cs (CanTimeout,
505 ReadTimeout and WriteTimeout).
507 2006-02-27 Gert Driesen <drieseng@users.sourceforge.net>
509 * File.cs: In 2.0 profile, File.Get****Time(Utc) should not throw
510 IOException if specified path does not exist. Fixes bug #77641.
512 2006-02-26 Gert Driesen <drieseng@users.sourceforge.net>
514 * FileStream.cs: To match MSFT, ignore FileShare.Inheritable on 2.0
515 profile. This fixes bug #77644. Improved usefulness of some existing
518 2006-02-22 Joerg Rosenkranz <joergr@voelcker.com>
520 * MonoIO.cs, MonoIOError.cs: Verbose exception for error 39
523 2006-02-03 Zoltan Varga <vargaz@gmail.com>
525 * Stream.cs FileStream.cs: Add new 2.0 Dispose () method and protected
526 Dispose (bool) method.
528 2006-01-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
530 * TextWriter.cs: Dispose () is public in 2.0.
532 2006-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
534 * UnexceptionalStreamReader.cs: Read (char,int,int) should not
535 return -1. Thanks to Jakob Berkman.
537 2006-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
539 * StreamReader.cs: (ReadToEnd) if Read returns -1 or 0, we're done.
541 2006-01-18 Atsushi Enomoto <atsushi@ximian.com>
543 * Path.cs : (GetRandomFileName) use random buffer ;-) It somehow
544 caused infinite loop on Windows.
546 2006-01-18 Atsushi Enomoto <atsushi@ximian.com>
548 * DirectoryInfo.cs : on Windows top directory is something like c:\.
550 2006-01-17 Joshua Tauberer <tauberer@for.net>
552 * StreamReader.cs: Avoid two totally unnecessary string creations.
555 2006-01-13 Ben Maurer <bmaurer@andrew.cmu.edu>
557 * TextWriter.cs: Call char[],int,int from the Write(char[]) method
558 both for msft compat and for performance. Thanks to "Mike Glenn"
559 <mglenn@zoominternet.net> for pointing.
561 2006-01-12 Ben Maurer <bmaurer@andrew.cmu.edu>
563 * File.cs: Support for Read/WriteAllText
565 2006-01-11 Sebastien Pouliot <sebastien@ximian.com>
567 * Path.cs: Previous fix caused regression of bug #76191. Fixed (again)
569 2006-01-09 Sebastien Pouliot <sebastien@ximian.com>
571 * Path.cs: Fix c14n on Windows when the first separator after the root
572 isn't '\'. Fix problems for XSP with 1.1.13.
574 2006-01-07 Miguel de Icaza <miguel@novell.com>
576 * Path.cs (GetTempFilename): Append ".tmp" to the path, some
577 external application expect this extension.
579 2006-01-05 Kornél Pál <kornelpal@hotmail.com>
581 * DriveNotFoundException.cs: Added.
582 * MonoIO.cs: Added ERROR_INVALID_DRIVE handling. Pass HResult to
583 IOException constructors.
584 * MonoIOError.cs: Expose ERROR_INVALID_DRIVE.
586 2006-01-02 Sebastien Pouliot <sebastien@ximian.com>
588 * UnexceptionalStreamReader.cs: Re-implemented the Read method to fix
589 the new line handling when reading from the Console (bug #77108).
591 2005-12-24 Kornél Pál <kornelpal@hotmail.com>
593 * FileStream.cs: Set buf_start to actual initial position when creating
594 FileStreams from handles.
596 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
598 * DirectoryInfo.cs: Fixed #77090 to fix /home parent to be / (and not
601 2005-12-21 Sebastien Pouliot <sebastien@ximian.com>
603 * Path.cs: Fixed #77058 where a Windows drive wasn't considered during
606 2005-12-20 Sebastien Pouliot <sebastien@ximian.com>
608 * Path.cs: Fixed #77007 where a Windows drive is specified with a
611 2005-12-15 Sebastien Pouliot <sebastien@ximian.com>
613 * DirectoryInfo.cs: Fixed #76903 where the Name property wasn't
614 correct in some cases. Added special case for Windows drives. Reduced
615 temporary allocations in Get* methods (removed ArrayList). Added some
616 new 2.0 methods (partial).
617 * MonoIO.cs: Removed InvalidPathChars icall as the return value is
618 different from 1.x and 2.0. The values are now defined in Path.cs.
619 * Path.cs: Fixed #76191 so that GetFullPath on a Windows drive returns
620 the current directory (if it's on the specified drive). Fixed 2.0 API
621 changes (e.g. static class).
622 * SearchOption.cs: Added missing [Serializable] (2.0).
624 2005-12-07 Zoltan Varga <vargaz@gmail.com>
626 * Directory.cs: Fix a warning.
628 2005-11-10 Dick Porter <dick@ximian.com>
630 * DirectoryInfo.cs: Fix endless recursion problem with root
631 directory on windows too. Fixes bug 76191.
633 2005-11-06 Zoltan Varga <vargaz@freemail.hu>
635 * Directory.cs: Add stub for net 2.0 GetFiles method.
637 * SearchOption.cs: New file.
639 2005-10-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
641 * StreamReader.cs: made ReadLine() less memory-hungry. Fixes bug #76399.
643 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
645 * MonoIO.cs: replace FindFirst/FindNext/FindClose with
646 GetFileSystemEntries.
647 * Directory.cs: simplify GetFileSystemEntries by using the new icall.
649 2005-10-01 Ben Maurer <bmaurer@ximian.com>
651 * BinaryReader.cs: The patch below had a nasty little bug with
652 long strings that had non-ascii chars in it, because it was
653 looking at the char count, not the byte count.
655 2005-09-11 Ben Maurer <bmaurer@ximian.com>
657 * BinaryReader.cs: An optimization for ReadString that had been
658 approved/well tested for a while but never gotten in. Bug #52754.
660 2005-09-05 Miguel de Icaza <miguel@novell.com>
662 * MonoIOError.cs: expose the ERROR_DIR_NOT_EMPTY as we are
665 * MonoIO.cs: Return a properly named error.
667 2005-08-23 Raja R Harinath <rharinath@novell.com>
670 * StreamReader.cs (DiscardBufferedData): Reset the decoder too.
672 2005-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
674 * BinaryReader.cs: use Buffer.BlockCopy instead of Array.Copy when
675 expanding the buffer.
677 2005-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
679 * Directory.cs: don't leak 'find' handles.
681 2005-07-05 Dick Porter <dick@ximian.com>
684 * MonoIOError.cs: Add error message for ERROR_WRITE_FAULT.
686 2005-07-04 Sebastien Pouliot <sebastien@ximian.com>
688 * DirectoryInfo.cs: Fixed recursion problem with root directory
689 introduced when fixing bug #75443.
691 2005-07-02 Sebastien Pouliot <sebastien@ximian.com>
693 * FileSystemInfo.cs: Fixed exception arguments. Added ComVisible for
695 * DirectoryInfo.cs: Fixed bug #75443 when the directory ends with a
696 separator. Added ComVisible for NET_2_0. Normalized line endings.
698 2005-05-26 Miguel de Icaza <miguel@novell.com>
700 * File.cs (ReadAllBytes): add.
702 Tue May 17 10:54:18 CEST 2005 Paolo Molaro <lupus@ximian.com>
704 * FileStream.cs: complete fix for #74971.
706 2005-05-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
708 * FileStream.cs: make WriteByte work in all cases when no buffer is
709 being used. Fixes bug #74971.
711 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
713 * Directory.cs: if the pattern is just a file name and it exists, return
714 it right away. Fixes bug #72143.
716 2005-05-06 Ben Maurer <bmaurer@ximian.com>
718 * File.cs (Open): If a stream is opened with Append access, you
719 only want Write access. Fixes bug #71088.
721 2005-04-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
723 * UnexceptionalStreamWriter.cs: don't throw anything on Flush. Closes
726 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
728 * Path.cs: don't trim the path in CanonicalizePath on non-windows
729 systems. Fixes bug #53173.
731 2005-04-09 Miguel de Icaza <miguel@novell.com>
733 * StreamWriter.cs (Initialize): Avoid echoing the preamble to a
734 file if the position of the stream is not at the beginning. Fixes
737 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
740 * MonoIO.cs: remove dead code related to async IO.
742 2005-03-24 Sebastien Pouliot <sebastien@ximian.com>
744 * Directory.cs: Added a Demand for Read/Write when creating a new
746 * FileSystemInfo.cs: Added an InheritanceDemand for Unrestricted on
748 * Path.cs: Added a Demand for PathDiscovery in GetFullPath method.
749 Added an Assert for unrestricted file access to GetTempFilename as
750 the method must create the (zero-length) file and can be called from
751 partially trusted code. Added a Demand for unrestricted environment
752 access to GetTempPath method.
753 * FileStream.cs: Added a Demand for UnmanagedCode for all constructors
754 accepting a file handle. Added LinkDemand and InheritanceDemand for
755 UnmanagedCode to get Handle and SafeFileHandle (2.0) properties.
757 2005-03-16 Lluis Sanchez Gual <lluis@novell.com>
759 * BinaryReader.cs, BinaryWriter.cs: Read/write dobules, floats and
760 decimals in little endian format.
762 2005-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
765 * MonoIOError.cs: handle ERROR_LOCK_VIOLATION.
767 2005-03-15 Sebastien Pouliot <sebastien@ximian.com>
769 * FileStream.cs: Anonymize part of the path when exceptions are throw
770 by a FileStream is used for isolated storage. Throw a DirectoryNotFound
771 Exception for any FileMode not just CreateNew (see new unit tests).
773 2005-03-09 Dick Porter <dick@ximian.com>
776 * MonoIO.cs: Add a few more exception messages
778 2005-02-11 Zoltan Varga <vargaz@freemail.hu>
780 * CheckPermission.cs: Fix warning.
782 2005-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
784 * File.cs: Exists does not throw when there are invalid characters in
786 * MonoIOError.cs: uncommented INVALID_NAME.
788 Patch by Gert Driesen.
790 2005-01-31 Sebastien Pouliot <sebastien@ximian.com>
792 * FileStream.cs: Added new constructor to allow anonymous files (i.e.
793 when Name property is "[Unknown]") for IsolatedStorage. Added
794 SafeFileHandle property and a reference to Microsoft.Win32.SafeHandles
795 for the NET_2_0 profile.
797 2005-01-28 Sebastien Pouliot <sebastien@ximian.com>
799 * FileNotFoundException.cs, FileLoadException.cs: Fixed bad "if ();".
801 2005-01-27 Sebastien Pouliot <sebastien@ximian.com>
803 * FileNotFoundException.cs, FileLoadException.cs: Protect the fusion
804 (GAC) log from being disclosed unless code has ControlPolicy and
805 ControlEvidence. Added missing HResult value. Fixed Message property
806 to match MS results. Changed ToString to use a StringBuilder.
808 2005-01-24 Sebastien Pouliot <sebastien@ximian.com>
810 * Directory.cs: Added CAS security to Get|SetCurrentDirectory to
811 complete Environment security checks.
813 2004-12-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
815 * BufferedStream.cs: use Buffer.BlockCopyInternal instead of Array.Copy.
817 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
819 * File.cs: delegate to the runtime the task of checking for destination
820 file existence in Move.
822 2004-12-11 Ben Maurer <bmaurer@ximian.com>
824 * BinaryReader.cs (ReadByte): Check for exceptions here.
826 2004-12-06 Atsushi Enomoto <atsushi@ximian.com>
828 * TextWriter.cs : create CoreNewLine in another .ctor().
830 2004-12-05 Ben Maurer <bmaurer@ximian.com>
832 * TextWriter.cs (WriteLine): Use CoreNewLine so that this does
833 not make a string out of the array every time it is called.
835 Thanks to Atsushi for the idea.
837 2004-12-04 Ben Maurer <bmaurer@ximian.com>
839 * DirectoryInfo.cs (CreateSubDirectory): Check the input here.
841 * FileSystemInfo.cs (CheckPath): Empty paths are invalid.
843 2004-11-19 Dick Porter <dick@ximian.com>
846 * MonoIO.cs: Add a proper message for sharing violation
848 2004-11-01 Ben Maurer <bmaurer@ximian.com>
850 * MonoIOError.cs: All of these fields just take up room in corlib,
851 bloating things up. To make it worse, we need to malloc data at
852 runtime about them. Since most are not used, am commenting them
855 2004-09-19 Dick Porter <dick@ximian.com>
857 * UnexceptionalStreamWriter.cs:
858 * UnexceptionalStreamReader.cs: Wrappers around StreamWriter and
859 StreamReader that catch IOException. Used by System.Console so
860 that graphical applications dont get IO errors when their
861 stdin/out/err vanishes (ie when they spew debug output.)
863 2004-09-12 Ben Maurer <bmaurer@ximian.com>
865 * BinaryReader.cs: Use ReadByte when possible. Gives a tad
866 of perf, and fixes a bug reported on mono-patches-list
868 2004-09-08 Miguel de Icaza <miguel@ximian.com>
870 * File.cs: Added Gettextification, provide a better error message
873 2004-09-08 Marek Safar <marek.safar@seznam.cz>
876 * File.cs: Class is static for NET_2_0.
878 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
880 * MemoryStream.cs (SetLength): Use Array.Clear here
882 2004-09-05 Ben Maurer <bmaurer@users.sourceforge.net>
884 * Path.cs (Combine): Array.IndexOf is slow (because of the
885 special cases it must handle). So, rather than doing IndexOf
886 just check each type of seperator.
888 2004-09-05 Ben Maurer <bmaurer@users.sourceforge.net>
890 * StringReader.cs (StreamReader): remove sourceChars and disposed
892 (Read): Copy directly from the string, rather than a char []
893 (Dispose, CheckObjectDisposedException): the flag for being
894 disposed is now source == null.
896 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
898 * Stream.cs: Close() does not call Flush(). Fixes bug #65340.
900 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
902 * StreamWriter.cs: avoid String.ToCharArray for perf.
904 2004-08-18 Dick Porter <dick@ximian.com>
906 * StreamWriter.cs: Flush the buffer if AutoFlush is set to true.
907 Fixes bug 63063, patch by Laurent Debacker (debackerl@yahoo.com).
909 2004-08-13 Dick Porter <dick@ximian.com>
911 * StreamWriter.cs: Allow FileShare.Read access to the underlying
912 FileStream, to be compatible with MS. Fixes bug 62152.
914 2004-07-06 Dick Porter <dick@ximian.com>
916 * MonoIO.cs: Add ERROR_INVALID_PARAMETER to the exception list.
917 Don't blow away the SetFileTime() error before the caller gets to
918 see it. Part of the bug fix to 60970.
920 2004-07-05 Dick Porter <dick@ximian.com>
922 * CheckPermission.cs:
926 * FileStream.cs: Give the filename when throwing
927 FileNotFoundException. Fixes bug 61120, based on patch from
928 Carlos Alberto Cesario <carloscesario@gmail.com>.
930 2004-07-05 Dick Porter <dick@ximian.com>
932 * File.cs: File.Move() should check that the destination doesn't
933 already exist. Fixes bug 60915, patch based on one from Carlos
934 Alberto Cesario <carloscesario@gmail.com>.
936 2004-06-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
938 * Directory.cs: implemented GetLogicalDrives.
940 2004-06-24 Lluis Sanchez Gual <lluis@novell.com>
942 * StreamReader.cs: In DiscardBufferedData(), reset the mayBlock flag.
944 2004-06-21 Atsushi Enomoto <atsushi@ximian.com>
947 .ctor() should block write access when created with FileAccess.Write.
949 2004-06-21 Atsushi Enomoto <atsushi@ximian.com>
951 * FileStream.cs : Check buffer size before creating file.
952 * StreamReader.cs : Check encoding!=null before creating file.
954 MonoIO.cs : Convert DateTime to FileTime after checking
955 file IO sharing violation (it just fixes the type of exception).
957 2004-06-15 Gert Driesen <drieseng@users.sourceforge.net>
959 * MemoryStream.cs: added TODO for serialization
960 * StringWriter.cs: added TODO for serialization
962 2004-06-15 Gert Driesen <drieseng@users.sourceforge.net>
964 * TextWriter.cs: fixed CoreNewLine to return char[]
966 2004-06-14 Dick Porter <dick@ximian.com>
969 * File.cs: Catch PATH_NOT_FOUND errors in Exists() too. Fixes bug
972 2004-06-09 Duncan Mak <duncan@ximian.com>
974 * BufferedStream.cs (SetLength): Add checks and throw the
975 appropriate Exceptions here instead.
977 * FileStream.cs (SetLength): Revert part of my last patch, we're
978 throwing ObjectDisposedException instead of IOException again.
980 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
982 * FileStream.cs: re-enabled ignoring broken pipe errors when reading.
985 2004-06-08 Duncan Mak <duncan@ximian.com>
987 * Directory.cs (IsRootDirectory): New helper method for
988 determining if a path is the root directory. Handles both Unix as
990 (GetParent): Use IsRootDirectory for the check.
992 2004-06-08 Duncan Mak <duncan@ximian.com>
994 * File.cs: Fix line endings, took out ^Ms.
996 * Directory.cs (GetParent): Return null if the specified path is
999 * StreamReader.cs (StreamReader):
1000 (Initialize): Add a check that buffer_size must not be less than
1003 2004-06-07 Duncan Mak <duncan@ximian.com>
1005 * FileStream.cs (SetLength): The other exceptions have precendence
1006 over ObjectDisposedException, which is not one of the exceptions
1007 listed in the documentation). Also, instead of throwing an
1008 ObjectDisposedException, throw an IOException.
1010 2004-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1012 * BufferedStream.cs: fixed typo that prevented Read() from working.
1013 This went out with beta 2. Closes bug #59534.
1015 2004-05-31 Atsushi Enomoto <atsushi@ximian.com>
1017 * Directory.cs, File.cs : Fixed Exists() that raised
1018 DirectoryNotFoundException. Quick fix for bug #59354.
1020 2004-05-30 Sebastien Pouliot <sebastien@ximian.com>
1022 * BinaryReader.cs: Added missing disposed check for most methods.
1023 Reordered some exceptions to match MS implementation.
1024 * BufferedStream.cs: Fixed Seek logic (check for CanSeek and dispose).
1025 SetLength must also reset Position and check for dispose.
1026 * FileStream.cs: Added missing check for invalid SeekOrigin. Added
1027 missing validations.
1029 2004-05-27 Dick Porter <dick@ximian.com>
1031 * FileSystemInfo.cs: Take out the error checking in Refresh(), it
1034 2004-05-27 Dick Porter <dick@ximian.com>
1036 * MonoIO.cs: Define icalls for Lock() and Unlock()
1038 * FileStream.cs: Implement Lock() and Unlock(). Also improve IO
1041 * FileSystemInfo.cs:
1043 * Directory.cs: Improve IO error reporting
1045 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1047 * FileStream.cs: delay seeking to the end when FileMode.Append is
1048 specified until after buffer initialization. Fixes bug #59151.
1050 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
1052 * BufferedStream.cs: Added globalization and fixed exceptions and
1053 possible integer overflow.
1054 * FileStream.cs: Fixed possible integer overflow.
1055 * MemoryStream.cs: Fixed possible integer overflow.
1056 * StringReader.cs: Fixed possible integer overflow.
1057 * TextWriter.cs: Fixed possible integer overflow.
1059 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
1062 DirectoryInfo.cs : ToString() should return constructor arg as is.
1063 This fixes bug #58804.
1065 2004-05-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1067 * Directory.cs: ERROR_FILE_NOT_FOUND in FindFirstFile means there are
1068 no files, but the directory was found. Fixes bug #58875.
1070 2004-05-24 Duncan Mak <duncan@ximian.com>
1072 * StreamWriter.cs (Close): Remember to set the 'closed' flag.
1075 * FileInfo.cs: Reformat the whole file to use DOS line endings.
1076 (MoveTo): Return if the destination of Move is the
1077 same as the file's current location.
1079 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
1081 * MemoryStream.cs: Fixed exception reporting to match MS Fx. Fixed the
1082 condition to allow zeroization of existing data when we shrink the
1084 * StreamReader.cs: Add checks for null encoding. Fixed possible integer
1085 overflow and ArgumentNullException in Read.
1086 * StreamWriter.cs: Add dispose check to Write(char) and Write(char[]),
1087 AutoFlush. Fixed possible integer overflow in Write(char[],int,int).
1088 * StringWriter.cs: Fixed possible integer overflow in Write. Changed
1091 2004-05-22 Duncan Mak <duncan@ximian.com>
1093 * Directory.cs: Reformat the whole file to use Unix line endings
1095 (GetFileSystemEntries): If pattern is String.Empty, always
1096 return an empty string array. Throw the ArgumentException if path
1097 is an empty string (determined using the new helper method)
1098 (IsEmptyString): Returns true on an empty string or a string with
1099 only whitespace characters.
1101 * Path.cs (GetPathRoot): Throw an ArgumentException if the path
1102 argument is String.Empty.
1104 2004-05-20 Jackson Harper <jackson@ximian.com>
1106 * DirectoryInfo.cs: Create subdirectories correctly if more then
1109 2004-05-16 Atsushi Enomoto <atsushi@ximian.com>
1111 * DirectoryInfo.cs: Fixed ToString() as well as FileInfo.
1113 2004-05-16 Atsushi Enomoto <atsushi@ximian.com>
1115 * FileInfo.cs: ToString() returns not full path but just the file name.
1117 2004-05-14 Marek Safar <marek.safar@seznam.cz>
1119 * TextWriter.cs: Removed useless [CLSCompliant (false)]
1121 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1123 * Directory.cs: use the real wildcard for file names as it is supported
1124 now in io-layer. SearhPattern is not needed now.
1126 2004-04-30 Ben Maurer <bmaurer@users.sourceforge.net>
1128 * BinaryWriter.cs, Stream.cs: ensure we have beforefieldinit.
1130 2004-04-29 Ben Maurer <bmaurer@users.sourceforge.net>
1132 * Path.cs: readonlyificate.
1134 2004-04-29 Ben Maurer <bmaurer@users.sourceforge.net>
1136 * FileStream.cs: constify.
1138 2004-04-27 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
1140 * SearchPattern.cs: Call invariant String.ToLower
1142 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1144 * FileStreamAsyncResult.cs: invoke the callback if set as completed
1145 before the asynchronous stuff jumps in.
1147 2004-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1149 * FileStream.cs: only pass the async flag set to true when opening the
1150 file and AIO is supported by the underlying system. Fixes bug #56883.
1152 2004-04-12 Gert Driesen (drieseng@users.sourceforge.net)
1154 * FileSystemInfo.cs: Implemented ISerializable, corrected COM
1155 visibility of UTC properties
1157 2004-04-01 Lluis Sanchez Gual <lluis@ximian.com>
1159 * BufferedStream.cs: On Position change, do not reset the buffer if the
1160 new position is in the limits of the buffer. This fixes #49403.
1162 2003-04-03 Atsushi Enomoto <atsushi@ximian.com>
1164 * Path.cs : ChangeExtension() does not remove dot(.) when extension is
1167 2004-04-01 Lluis Sanchez Gual <lluis@ximian.com>
1169 * FileSystemInfo.cs: Added InternalRefresh, a virtual method that derived
1170 classes can override to perform class specific refreshing.
1171 * FileInfo.cs: Refresh existence flag when Refresh is called.
1172 * TextWriter.cs: Applied patch by Benjamin Jemlich for bug #52512.
1173 The method Write(char) should do nothing by default.
1175 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1177 * BinaryReader.cs: don't modify the underlying stream in Peek(). Fixes
1178 bug #51741. Patch by Nick Vaughan.
1180 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
1182 * FileStream.cs: ReadByte(): when buffering is disabled, read the byte
1183 with a direct call to ReadData. In InitBuffer(), if buffering is
1184 disabled, create a buffer of one byte, to be used in ReadByte. This
1187 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
1189 * Path.cs: In GetDirectoryName, fixed check for volumeSeparator. This
1192 2004-03-24 Lluis Sanchez Gual <lluis@ximian.com>
1194 * File.cs: In Move, throw IOException instead of ArgumentException if
1195 destination is a directory.
1196 * MonoIO.cs: In ExistsDirectory, return ERROR_PATH_NOT_FOUND instead of
1197 ERROR_FILE_NOT_FOUND, since we are looking for a directory, not a file.
1199 2004-03-15 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
1201 * StreamWriter.cs: Removed unneeded function
1203 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1205 * FileStream.cs: added support for asynchronous I/O without using the
1206 OS native libraries if available.
1208 * FileStreamAsyncResult.cs: IAsyncResult for asynch. I/O.
1210 * MonoIO.cs: added BeginRead/Write, GetSupportsAsync. Open has now a
1211 new parameter to tell ifthe file will be used for asynch operations.
1213 * Stream.cs: BeginRead/Write do not use delegates. They just are
1214 actually synchronous.
1216 * StreamAsyncResult.cs: IAsyncResult for Stream.
1218 2004-03-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1220 * Directory.cs: check if the error returned in Exists is different
1221 from 'path not found' and throw the appropiate exception in that case.
1224 2004-03-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1226 * MonoIO.cs: added case for ERROR_FILENAME_EXCED_RANGE.
1228 2004-02-25 Jackson Harper <jackson@ximian.com>
1230 * File.cs: Report the filename when deleting a file fails. Patch
1231 by Gert Driesen. Fixes bug #54855.
1233 2004-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1235 * FileStream.cs: remove dangling ^Ms.
1237 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1239 * FileStream.cs: (.ctor) Path.DirectoryName can be empty and make
1240 Path.GetFullPath crash. Fixed it.
1242 * MonoIO.cs: fixed typo.
1244 2004-02-13 Jackson Harper <jackson@ximian.com>
1246 * FileStream.cs: Throw some more exceptions for invalid
1247 params. Fixes some unit test failures.
1248 * BufferedStream.cs: If the stream is closed (can't read from it
1249 or write to it) throw an ObjectDisposedException.
1251 Tue Jan 20 23:10:22 CET 2004 Paolo Molaro <lupus@ximian.com>
1253 * StreamWriter.cs, TextWriter.cs: comply with the documented
1254 behaviour and use a decode buffer to improve performance.
1256 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1258 * Path.cs: now Path.GetFullPath ("/") returns "/" instead of "".
1260 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1262 * Path.cs: add the trailing directory separator only for volumes.
1265 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
1267 * IntPtrStream.cs: Fix build bustage.
1269 * IntPtrStream.cs: Add a 'Closed' event. Also throw exceptions after
1270 the stream is closed.
1272 2004-01-18 Ben Maurer <bmaurer@users.sourceforge.net>
1274 * FileStream.cs: Locking from bug #32344 removed. This is not
1275 necessary because the correct fix was actually in the console.
1276 This fixes bug #53026. Miguel de Icaza reviewed/approved this
1279 2004-01-14 Zoltan Varga <vargaz@freemail.hu>
1281 * FileStream.cs (.ctor): Avoid allocating a large buffer when reading
1284 2004-01-10 Atsushi Enomoto <atsushi@ximian.com>
1286 * Path.cs : GetDirectoryName ("c:\readme.txt") should return "c:\"
1287 instead of "c:" . This fixed bug #52735.
1289 2004-01-04 Nick Drochak <ndrochak@gol.com>
1291 * Path.cs: Remove defined but unused variable, and also got rid of
1292 some unreachable code. Eliminates some build warnings.
1294 2003-12-28 Ben Maurer <bmaurer@users.sourceforge.net>
1296 * BinaryWriter.cs: use one encoding buffer for writing
1297 strings rather than allocting one/string. HUGE perf
1298 boost when writing many strings.
1300 2003-12-25 Atsushi Enomoto <atsushi@ximian.com>
1302 * Path.cs : Fixed GetFullPath() (and CanonicalizePath()),
1303 HasExtension(), GetPathRoot() and IsPathRooted() to fit with tests.
1305 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
1307 * FileStream.cs: (.ctor) do not set handle
1308 in object until after it is validated via
1309 GetFileType so finalizer doesn't see bad handles and
1310 initialize this.handle to InvalidHandle
1312 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
1314 * MonoIO.cs: SetFileTime() Failed Open returns InvalidHandle
1317 2003-12-17 Atsushi Enomoto <atsushi@ximian.com>
1319 * Directory.cs : SetCurrentDirectory() should raise errors for
1320 some kind of arguments.
1322 2003-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1324 * Path.cs: GetTempPath () ends with DirectorySeparatorChar. Fixes bug
1327 2003-12-06 Ravindra <rkumar@novell.com>
1328 *MonoIO.cs: Added a new exception case. It is thrown
1329 when a directory creation is attempted with a name that
1330 is already used by an existing file.
1332 2003-11-28 Dick Porter <dick@ximian.com>
1334 * Path.cs: Use the char form of LastIndexOf, so that the
1335 comparison is done with the Invariant culture.
1337 2003-11-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1339 * Directory.cs: provide the path when getting the IOException.
1341 2003-11-18 John Luke <jluke@cfl.rr.com>
1344 (PathLength): fix recursion found by JonK
1346 2003-11-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1349 (GetCurrentDirectory):
1350 (SetCurrentDirectory): moved here from Environment. Handle error cases.
1352 * MonoIO.cs: add path to the default error message.
1354 2003-11-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1356 * StringReader.cs: fixed ReadLine for some cases where there are mixed
1357 '\r' and '\n'. Closes bug #51020.
1359 2003-11-14 Ben Maurer <bmaurer@users.sourceforge.net>
1361 * MemoryStream.cs (.ctor): We need to check if buffer is null
1362 before we get the Length of it.
1364 2003-11-14 Miguel de Icaza <miguel@ximian.com>
1366 * StreamReader.cs, TextReader, StreamReader (Read): Add [Out]
1368 2003-11-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1370 * Directory.cs: allow directory names without wildcards in the pattern.
1373 * SearchPattern.cs: made InvalidChars and WildcardChars internal.
1375 2003-11-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1377 * FileStream.cs: use the argument name when throwing exception.
1381 * TextReader.cs: added [In] attribute for the array in Read.
1383 2003-11-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1385 * DirectoryInfo.cs: fixed ToString. Closes bug #50842.
1387 2003-11-12 Miguel de Icaza <miguel@ximian.com>
1389 * Directory.cs: Adjust for missing PlatformID.Unix.
1391 2003-10-28 Miguel de Icaza <miguel@ximian.com>
1393 * StreamReader.cs: Add checks for disposed stream from bug report
1394 #48696 (Patrik Reali)
1396 * TextReader.cs (Read): Return the total number of bytes read,
1397 patch from Patrik Realli.
1399 2003-10-20 Miguel de Icaza <miguel@ximian.com>
1401 * FileStream.cs public FileStream (string name, FileMode mode)
1402 constructor: If we pass FileMode.Append, we can not pass
1403 FileAccess.ReadWrite. This fixes bug 44959
1405 2003-09-26 Miguel de Icaza <miguel@ximian.com>
1407 * BufferedStream.cs (Write): Use CanWrite in Write. Patch from
1408 Francisco Figueiredo Jr.
1410 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1412 * BinaryReader.cs: return the correct number of bytes read when there
1413 are some bytes from peeking.
1415 2003-09-11 Lluis Sanchez Gual <lluis@ximian.com>
1417 * BufferedStream.cs, FileStream.cs, MemoryStream.cs, Stream.cs:
1418 Added [In,Out] attributes to Read method.
1420 2003-08-05 Martin Baulig <martin@ximian.com>
1422 * StreamReader.cs (DiscardBufferedData): Do the same like on the
1423 ms runtime: just discard the buffered data, but don't modify the
1424 BaseStream.Position.
1426 2003-08-04 Martin Baulig <martin@ximian.com>
1428 * StreamReader.cs (DiscardBufferedData): Implemented.
1430 2003-07-29 Miguel de Icaza <miguel@ximian.com>
1432 * IntPtrStream.cs (Read): Use correct offset here; Change the
1433 code to use a byte* instead of an IntPtr to reduce the number of
1436 (Read): Use Marshal.Copy instead of the now
1439 (IntPtrStream): New stream implementation, it maps to a region in
1442 2003-07-23 Duncan Mak <duncan@ximian.com>
1444 * StreamReader.cs (Initialize): This method is not exposed in the
1445 API, mark as internal.
1447 Fri Jul 18 14:42:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
1449 * MonoIO.cs: 64bit fix from Bernie Solomon <bernard@ugsolutions.com>.
1451 2003-07-16 Dick Porter <dick@ximian.com>
1453 * FileInfo.cs: Update path info when a file is moved. Patch by
1454 John Luke <jluke@cfl.rr.com>, fixes bug 44253.
1456 2003-07-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1458 * MemoryStream.cs: fixed bug #46060. Thanks to Carlos Barcenilla.
1460 2003-06-30 Zoltan Varga <vargaz@freemail.hu>
1462 * FileStream.cs (Dispose): Flush the buffer even if we don't own the
1464 * FileStream.cs: Add a new constructor parameter to turn off buffering.
1465 This is used by the Console.OpenStandard...() methods. Also fix
1466 argument checking in InitBuffer(), so a zero buffer size is also
1469 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
1471 * Stream.cs: use async.delegate invoke
1473 2003-06-18 Nick Drochak <ndrochak@gol.com>
1475 * FileSystemInfo.cs: Refresh cache when changeing file times.
1477 2003-06-11 Zoltan Varga <vargaz@freemail.hu>
1479 * FileStream.cs: Fix errors in previous checkins:
1480 (Write): Only take the shortcut route if the data is longer than the
1482 (Write): Flush the buffer before writing out the new data
1483 (Write): Flush the buffer after writing out a segment since otherwise
1484 we will go into an infinite loop.
1485 (FlushBuffer): Remove my last change since it was clearly wrong.
1486 (Seek): Run FlushBuffer () after the in-buffer seek optimization.
1487 (Seek): Only use the in-buffer optimization if the buffer is not
1489 (Length): Call FlushBuffer () since buffer data might change the size
1492 2003-06-09 Ville Palo <vi64pa@kolumbus.fi>
1495 - removed unusefull bugfix (DirectoryNotFoundException)
1496 - Flush before seek.
1498 2003-06-09 Ville Palo <vi64pa@kolumbus.fi>
1500 * FileStream.cs: Check buffer size before append/read -exceptios
1502 2003-06-09 Ville Palo <vi64pa@kolumbus.fi>
1504 * FileStream.cs: Check DirectoryNotFound before FileNotFound.
1506 2003-06-09 Ville Palo <vi64pa@kolumbus.fi>
1508 * FileStream.cs: Does not anymore flush while writing
1510 2003-06-02 Nick Drochak <ndrochak@gol.com>
1512 * FileInfo.cs (MoveTo): Throw exceptions when dest exists, and check
1515 2003-05-27 Lluis Sanchez Gual <lluis@ximian.com>
1517 * BinaryReader.cs: Stream don't need to be seekable to use PeekChar.
1519 2003-05-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1521 * Path.cs: fixed bug #42631.
1523 2003-05-22 Zoltan Varga <vargaz@freemail.hu>
1525 * File.cs (Move): Allow moving of directories.
1526 Fix 'destination is a directory' test.
1528 2003-05-21 Ben Maurer <bmaurer@users.sourceforge.net>
1530 * StringWriter.cs: Fixed bug #43431: "StringWriter
1531 .ctor(CultureInfo) does not create a new StringBuilder ()"
1533 2003-05-11 Zoltan Varga <vargaz@freemail.hu>
1535 * FileStream.cs (FlushBuffer): After a flush, the buffer is
1536 advanced by buf_offset bytes, not buf_length bytes.
1538 2003-05-16 Dick Porter <dick@ximian.com>
1540 * MonoIO.cs: Implement GetTempPath
1542 2003-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1544 * DirectoryInfo.cs: fixed bug #42991.
1546 (CanonicalizePath): store the value of the trimmed input string. Make it
1547 work with paths such as "/home/xxx/.".
1549 2003-05-08 Ben Maurer <bmaurer@users.sourceforge.net>
1551 (CanonicalizePath) Fixed bug #42631, which duplicated the
1552 root part of the path under Windows.
1554 2003-05-08 Ville Palo <vi64pa@kolumbus.fi>
1556 * FileSystemInfo.cs: Added 1.1 properties LastAccessTimeUtc,
1557 LastWriteTimeUtc and CreationTimeUtc
1559 2003-05-07 Ben Maurer <bmaurer@users.sourceforge.net>
1561 (GetPathRoot) Added support for UNC paths.
1562 (CanonicalizePath) Added optimizations per Miguel's requests.
1564 2003-05-06 Ville Palo <vi64pa@kolumbus.fi>
1566 * BufferedStream.cs:
1567 - Removed unusefull code.
1568 - Added ObjectDisposedException to Position
1569 - Dont flush if stream is allready closed.
1570 - Flush throws also ObjectDisposedException.
1572 - GetFileSystemEtries: ArgumentNullException if pattern is null
1573 * DirectoryInfo.cs: Fixed little MoveTo () bug.
1575 - Exists: If file does not exists when instance is created the
1576 value of the Exists property does not change even if file is created
1578 - Delete: If path is a directory UnauthorizedException is thrown.
1579 - CopyTo: Now we can overwrite file if wanted.
1581 - GetFullPath: Now throws exception when path is " ".
1583 2003-05-04 Ben Maurer <bmaurer@users.sourceforge.net>
1584 * Directory.cs (GetLogicalDrives) Marked as MonoTODO
1585 because we need to implement the method on Windows.
1587 (CanonicalizePath) Added new function to get
1588 rid of . and .. in path names. Need to figure out what
1589 other functions should call this.
1590 (GetFullPath) Added call to the above function.
1592 2003-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1595 (.ctor): fixed parameters passed to FileNotFoundException.
1597 2003-04-25 Dietmar Maurer <dietmar@ximian.com>
1599 * BinaryReader.cs (Read): make sure the buffer is big enough (fix
1602 2003-04-24 Pedro Martinez Julia <yoros@wanadoo.es>
1604 * BufferedStream.cs: Test if it's possible to seek in a Stream
1605 before access to Position. This prevents the exception thrown when
1606 the stream is System.Net.Sockets.NetworkStream.
1608 2003-04-22 Ville Palo <vi64pa@kolumbus.fi>
1610 * Directory.cs: clean up --> performance improvment. Some exceptions
1611 are now checked in File.cs.
1612 * File.cs: Implemented Get/SetXXXTimeUtc () methods. Some bugfixes.
1614 2003-04-21 Ville Palo <vi64pa@kolumbus.fi>
1616 * Directory.cs: lots of fixes.
1617 - Added GetXXXtimeUtc () (v1.1) methods.
1618 - Added SetXXXtimeUtc () (v1.1) methods.
1620 2003-04-20 Igor Nosyryev <nosyryev@attbi.com>
1622 * StringReader.cs (Read): Increment nextChar by charsToRead
1623 instead of count, that will guarantee that the next time the
1624 method is called, it will return 0 on an empty string rather than
1625 throwing an exception
1627 2003-04-19 Ville Palo <vi64pa@kolumbus.fi>
1629 * BufferedStream.cs: Some fixes, mostly throwing exceptions.
1630 * MemoryStream.cs: Changed the order of exception checking
1631 * StringReader.cs: little clean up
1633 2003-04-14 Ville Palo <vi64pa@kolumbus.fi>
1635 * BinaryWriter.cs: Fixed decimal writing and lots of
1636 ObjectDisposedExceptions added.
1638 2003-04-13 Ville Palo <vi64pa@kolumbus.fi>
1640 * BinaryReader.cs: Fix to ReadDecimal() method.
1642 2003-04-13 Ville Palo <vi64pa@kolumbus.fi>
1644 * StringReader.cs: Added some ObjectDisposedExceptions.
1645 * StringWriter.cs: Added some ObjectDisposedExceptions.
1646 * BinaryReader.cs: Added some ObjectDisposedExceptions.
1648 2003-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1650 * FileStream.cs: fixed the windows build. This is an mcs bug. I'll
1653 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1655 * FileStream.cs: fixed bug #40182 and made more unit test pass.
1657 2003-04-11 Ville Palo <vi64pa@kolumbus.fi>
1659 * FileStream.cs: Added new methods Lock () and Unlock ()
1661 2003-04-11 Ville Palo <vi64pa@kolumbus.fi>
1663 * StringReader.cs: Throws exceptions if constructor parameter is null.
1665 2003-04-11 Ville Palo <vi64pa@kolumbus.fi>
1667 * StringWriter.cs: Now throws an exception if StringBuilder parameter
1670 2003-04-05 Miguel de Icaza <miguel@ximian.com>
1672 * TextWriter.cs: Implemented Synchronized method.
1674 * TextReader.cs: Implemented Synchronized method.
1676 2003-04-04 Miguel de Icaza <miguel@ximian.com>
1678 * FileStream.cs (Read, ReadByte, Seek): throw
1679 ObjectDisposedException if the handle has been released.
1681 (Read): Throw exceptions specified in the spec.
1683 (Read, Write, ReadSegment, WriteSegment): There is no requirement for any
1684 instance methods of FileStream to be thread safe, so remove all
1685 the calls to lock on the object
1687 2003-03-31 Nick Drochak <ndrochak@gol.com>
1689 * Path.cs (GetDirectoryName): Throw proper execption when path is empty.
1691 2003-03-20 Lluis Sanchez Gual <lluis@ideary.com>
1693 * FileNotFoundException.cs: fixed serialization bug.
1695 2003-03-18 Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
1697 * StringWriter.cs : don't release internalString on Dispose().
1699 2003-03-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1701 * StreamReader.cs: fixed bug #39280.
1703 2003-03-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1705 * Directory.cs: readded mkdir -p behavior. Thanks to kiwnix for
1708 2003-03-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1710 * MemoryStream.cs: general fixes and reformatted. Passes all tests in
1711 the new MemoryStreamTest.
1713 2003-03-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1715 * MemoryStream.cs: undo my bogus fix in ToArray. Allow GetBuffer and
1716 ToArray even after closing the stream.
1718 2003-03-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1721 (Move): don't use File.Move.
1722 * DirectoryInfo.cs: fixed Name property.
1726 2003-03-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1728 * DirectoryInfo.cs: changed ToString to match MS behavior.
1729 * Path.cs: further fixes to GetDirectoryName to return null in the
1730 same cases that MS does.
1734 2003-03-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1736 * Path.cs: fixed a couple of bugs reported in #35906.
1738 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1740 * Directory.cs: fixed bugs #38939 and #38940. No need for separate
1741 unix/windows/unc shares code paths.
1743 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1745 * File.cs: fix by Elan Feingold <efeingold@mn.rr.com> for
1746 SetCreationTime, SetLastAccessTime and SetLastWriteTime.
1748 2003-02-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1751 (ToArray): return only the portion of the buffer that contains
1752 data, not the whole buffer. (note: this makes XmlDocument.Load work
1753 again with documents that have a <?xml without the 'encoding'
1754 attribute, which makes gtk-sharp generator work again).
1756 2003-02-25 Nick Drochak <ndrochak@gol.com>
1758 * File.cs (GetCreationTime): Throw proper execption when path is not
1761 Tue Feb 25 11:55:35 CET 2003 Paolo Molaro <lupus@ximian.com>
1763 * MemoryStream.cs: make it behave sanely when the stream is
1764 incrementally expanded.
1766 2003-02-21 Dick Porter <dick@ximian.com>
1768 * FileStream.cs: Use locks around buffer manipulations. Fixes bug
1771 2003-02-18 Dick Porter <dick@ximian.com>
1773 * FileStream.cs: Make FileMode.Append work, and check for Seeking
1774 back over old data (undocumented ms behaviour, throws an exception
1775 if you try). Fixes bug 35975.
1777 2003-02-17 Dick Porter <dick@ximian.com>
1779 * FileStream.cs: Don't close the handle if the stream doesn't own
1780 it. Patch from Raymond Penners (raymond@dotsphinx.com), bug
1783 2003-02-14 Zoltan Varga <vargaz@freemail.hu>
1785 * FileStream.cs (Write): flush after writing the last segment as well.
1787 2003-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1790 (ReadLine): fixed the case when the string ends with a '\n'.
1792 2003-02-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1794 * MemoryStream.cs: create the buffer of the specified capacity.
1796 2003-01-31 Patrik Torstensson
1798 * MemoryStream.cs: use BlockCopyInternal instead of Array.Copy, this is
1799 the same way as MS does it (performance improvement)
1801 2003-01-29 Zoltan Varga <vargaz@freemail.hu>
1803 * Directory.cs (GetFileSystemEntries): moved error handling to the
1804 correct instance of GetFileSystemEntries so all callers can enjoy it.
1806 2003-01-28 Zoltan Varga <vargaz@freemail.hu>
1808 * File.cs: add error handling to Get...Time methods.
1810 2003-01-26 Zoltan Varga <vargaz@freemail.hu>
1812 * Directory.cs: fix GetParent so it actually works.
1814 2003-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1816 * Path.cs: fixlet to ChangeExtension for the case when the path is
1819 2003-01-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1821 * BufferedStream.cs: don't try to write a 0 sized array on when
1822 flushing the stream.
1826 2003-01-18 Jonathan Pryor <jonpryor@vt.edu>
1828 * FileStream.cs: Add IsAsync property. (Documented in "C# In A Nutshell".)
1830 2003-01-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1832 * MemoryStream.cs: fixed bug #36319.
1834 2002-12-16 Eduardo Garcia Cebollero <kiwnix@yahoo.es>
1836 * Directory.cs: Some fixes to SMB shares handling, and not compiling
1837 with csc, mcs compiles it correctly (mcs bug 35652)
1839 2002-12-14 Eduardo Garcia Cebollero <kiwnix@yahoo.es>
1841 * Directory.cs: Some fixes related to correct some exceptions thrown
1843 2002-12-11 Eduardo Garcia Cebollero <kiwnix@yahoo.es>
1845 * Directory.cs: Some Exceptions added, fixed GetParent(),
1846 CreateDirectory() should work with unix, native windows and
1847 windows samba shares. Converted end-lines from dos-mode to unix-mode
1849 2002-12-08 Eduardo Garcia Cebollero <kiwnix@yahoo.es>
1851 * Directory.cs: CreateDirectory works now with Absolute paths
1852 too, not only with relative ones.
1854 2002-12-07 Peter Williams <peterw@ximian.com>
1856 * Directory.cs: Don't use the uninitialized pathsumm here.
1857 Don't try and create "" if we're using an absolute path.
1859 2002-12-07 Eduardo Garcia Cebollero <kiwnix@yahoo.es>
1861 * Directory.cs: Now the creation of a new directory works recursively
1862 it will make parents as needed.
1864 2002-11-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1866 * BufferedStream.cs: applied patch from <carlosga@telefonica.net> that
1869 Tue Nov 19 13:01:22 CET 2002 Paolo Molaro <lupus@ximian.com>
1871 * StreamWriter.cs: output the encoding preamble at the start of a
1874 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1876 * StreamReader.cs: Changed all Encoding.UTF8 to Encoding.UTF8Unmarked.
1878 2002-11-06 Miguel de Icaza <miguel@ximian.com>
1880 * StreamWriter.cs: Changed all Encoding.UTF8 to Encoding.UTF8Unmarked.
1882 2002-10-31 Dick Porter <dick@ximian.com>
1884 * FileStream.cs: Fix buffering properly this time. Also kludge
1885 around broken pipe errors, treating them as EOF instead of
1886 throwing an IO exception.
1888 * MonoIO.cs: Return the error status in a parameter, as the
1889 GetLastError() value has long since been blown away if we try and
1890 look it up in a subsequent internal call invocation.
1892 * FileSystemInfo.cs:
1895 * Directory.cs: MonoIO methods now have an error parameter
1897 2002-10-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1899 * TextReader.cs: implemented ReadBlock ().
1901 2002-10-30 Miguel de Icaza <miguel@ximian.com>
1903 * StreamWriter.cs: Ditto for Null stream.
1905 * BinaryReader.cs: Use Unmarked here too.
1907 * BinaryWriter.cs: Use the UTF8Unmarker encoding by default, this
1910 2002-10-23 Dick Porter <dick@ximian.com>
1912 * FileStream.cs: Implemented CanSeek, and used it around all the
1913 calls to MonoIO.Seek. Fixed buffering in Read() so that it
1914 doesn't block forever on short reads.
1916 * MonoFileType.cs: New enum for GetFileType
1918 * MonoIO.cs: Added GetFileType
1920 2002-10-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1922 * StreamReader.cs: ReadLine now treats a \r not followed by a \n as a
1923 \n (this is what MS does).
1925 2002-10-18 Dick Porter <dick@ximian.com>
1927 * FileStream.cs: SeekOrigin.End still calculates the offset from
1928 the end of the file with positive values extending the length.
1931 2002-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1933 * Path.cs: some cleanup. Thanks to Martin Aliger.
1935 2002-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1937 * FileStream.cs: throw an exception if trying to open a directory.
1938 Thanks to Martin Aliger.
1940 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1942 * Path.cs: fixes bug #28046.
1944 2002-09-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1946 * StreamReader.cs: give more information when wrong parameters passed.
1948 2002-09-21 Miguel de Icaza <miguel@ximian.com>
1950 * FileStream.cs: Do not call FSync on the file.
1952 2002-09-16 Miguel de Icaza <miguel@ximian.com>
1954 * TextWriter.cs (Null): The Null field should be an instance of a
1955 TextWriter class that does nothing, so it is an instance of the
1956 NullTextWriter class.
1958 2002-09-16 Nick Drochak <ndrochak@gol.com>
1960 * MemoryStream.cs (Close): Don't throw an exception if the stream
1963 2002-09-15 Miguel de Icaza <miguel@ximian.com>
1965 * FileStream.cs (Dispose): Call FlushBuffer(), and not Flush, as
1966 Flush calls fsync().
1968 The API docs show no explicit mention that Flush() should even do
1969 an fsync, I am thinking that we should drop that from the
1972 2002-09-09 Miguel de Icaza <miguel@ximian.com>
1974 * StreamWriter.cs: When no encoding is provided, create an
1975 encoding without markers, this is what MS does.
1977 2002-09-06 Miguel de Icaza <miguel@ximian.com>
1979 * StreamReader.cs: Implement detection of byte marks and skipping
1980 of byte marks at the beginning of the stream.
1982 (ReadToEnd): Use buffered read instead of char-by-char
1985 Correct the default arguments for creating the StreamReader.
1987 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1989 * CheckArgument.cs: fixed check for empty string.
1990 * Path.cs: various fixes. It passes all the tests in new PathTest.
1992 2002-08-29 Duncan Mak <duncan@ximian.com>
1994 * StreamWriter.cs: Set DisposedAlready after calling flush. Fixes
1997 2002-08-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2006 * TextWriter.cs: IDisposable fixes.
2008 2002-08-24 Miguel de Icaza <miguel@ximian.com>
2010 * StreamReader.cs: Removed TODOs, as the code seems to be
2013 * Path.cs (GetTempFileName): Make this routine atomic by not
2014 testing and then creating, but using the create call to ensure
2015 that we own the filename.
2017 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2019 * FileLoadException.cs: implemented ToString.
2021 * StreamWriter.cs: added Null field and implemented Write (char) and
2024 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2026 * StreamReader.cs: implemented NullStreamReader.
2028 2002-08-21 Miguel de Icaza <miguel@ximian.com>
2030 * Path.cs (GetDirectoryName): Fix for filenames with size = 1
2032 * File.cs: Removed all references that threw exceptions when the
2033 paths contains a colon, as this is a valid part of an identifier
2036 Everywhere: The String.Empty return from GetDirectoryName means
2037 that there is no directory information about the path.
2039 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2041 * FileNotFoundException.cs: use Message and InnerException from base
2042 class. Changed Message and ToString ().
2044 2002-08-19 Dick Porter <dick@ximian.com>
2046 * BinaryWriter.cs: The length of a string is counted in bytes, not
2049 2002-08-18 Dick Porter <dick@ximian.com>
2051 * BinaryReader.cs: Fixed buffering
2053 2002-08-09 Nick Drochak <ndrochak@gol.com>
2055 * BinaryReader.cs: added virtual to Dispose(bool).
2057 2002-08-03 Jason Diamond <jason@injektilo.org>
2059 * StringWriter.cs: Return UnicodeEncoding for Encoding property.
2061 2002-08-03 Jason Diamond <jason@injektilo.org>
2063 * StreamWriter.cs: Use GetByteCount() to get exact length instead
2064 of GetMaxByteCount when converting chars to bytes.
2066 2002-07-31 Duncan Mak <duncan@ximian.com>
2069 (Dispose): Added and implmented.
2072 (Dispose): Fixed visibility.
2073 (Initialize): Fixed visibility, made internal.
2076 (Dispose): Fixed visibility.
2078 2002-07-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2081 (Create): allow file names without path.
2083 Fri Jul 26 15:45:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
2085 * FileStream.cs: patch from erik@bagfors.nu to add
2086 Name property support.
2088 2002-07-20 Dick Porter <dick@ximian.com>
2090 * MonoIO.cs: Added icall to CreatePipe
2092 2002-07-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2094 * FileInfo.cs: fixes buglet #27940
2096 2002-07-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2098 * Path.cs: removed unneeded line from GetExtension.
2100 2002-07-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2103 (.ctor): call MonoIO.GetException with the file name.
2105 2002-07-02 Mike Kestner <mkestner@speakeasy.net>
2107 * StreamReader.cs: Guard against ^\n lines as pointed out by Gonzalo.
2109 2002-07-02 Mike Kestner <mkestner@speakeasy.net>
2111 * StreamReader.cs: Revert the last Peek change and fix the ReadLine
2112 end of line detection code instead.
2114 2002-07-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2117 (Peek): no need to have seek capabilitites.
2119 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
2121 * Path.cs (ChangeExtension): handle some special cases (fixes bug #25319)
2123 * File.cs (Delete): only call Directory.Exists() if DirName != ""
2125 2002-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2127 * Directory.cs: fixed bug #26133 and also test if the directory exist
2128 before performing the search.
2130 2002-06-12 Nick Drochak <ndrochak@gol.com>
2132 * StringReader.cs (ReadLine): Return null when we get to end of the
2135 2002-05-22 Lawrence Pit <loz@cable.a2000.nl>
2137 * StreamWriter.cs: added ability to write null value
2139 2002-05-19 Lawrence Pit <loz@cable.a2000.nl>
2141 * Stream.cs: NullStream.ReadByte now returns -1 instead of 0 to
2142 prevent endless loops.
2144 2002-05-17 Dan Lewis <dihlewis@yahoo.co.uk>
2146 * FileStream.cs: Enforce lower bound on buffer size.
2148 2002-05-16 Piers Haken <piersh@friskit.com>
2150 * Stream.cs: Implement synchronous {Begin|End}{Read|Write}() methods.
2152 2002-05-17 Nick Drochak <ndrochak@gol.com>
2154 * StreamWriter.cs: Implement buffering. Also implemented dispose
2155 pattern as recommended by the MS docs. Must call Close() now
2156 to ensure the buffer is flushed.
2158 2002-05-15 Nick Drochak <ndrochak@gol.com>
2160 * Path.cs (GetDirectoryName): Return String.Empty if there is no
2163 * StreamReader.cs: Add some parameter checking on file names.
2165 * StreamWriter.cs: Add some parameter checking on file names.
2167 2002-05-14 Nick Drochak <ndrochak@gol.com>
2169 * File.cs: Add parameter checks to most methods. Not completely done,
2170 but all current unit tests pass.
2172 * Path.cs: Implement GetTempFileName().
2174 2002-05-10 Nick Drochak <ndrochak@gol.com>
2176 * StreamWriter.cs (Flush): Throw proper exception if internal stream
2177 has already been closed when we try to flush.
2179 2002/05/10 Nick Drochak <ndrochak@gol.com>
2181 * FileNotFoundException.cs (ToString): Don't try to use the inner
2182 exception, because it might be null. Use the message instead.
2184 2002-05-09 Nick Drochak <ndrochak@gol.com>
2186 * File.cs (Delete): Do not throw an exception if the file does not
2189 2002-05-08 Mike Gray <mikeg@mikegray.org>
2191 * File.cs: According to ECMA spec and MS docs Copy(src, dest)
2192 should not overwrite dest by default.
2194 2002-05-08 Nick Drochak <ndrochak@gol.com>
2196 * StreamWriter.cs: Add paramter check to constructors and throw
2197 exceptions where appropriate.
2199 Tue May 7 11:47:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
2201 * StreamReader.cs: return the number of chars read even if we diddn't
2202 fill the whole buffer (makes Sergey's ilasm work with mono).
2204 2002-05-07 Mike Gray <mikeg_us@hotmail.com>
2206 * FileInfo.cs (Create): Implement missing method.
2208 2002-05-07 Mike Gray <mikeg_us@hotmail.com>
2210 * File.cs: Implemented CreateText method, and fixed dst compares
2211 to compare against "" instead of null twice.
2213 2002-05-05 Nick Drochak <ndrochak@gol.com>
2215 * StreamReader.cs: Throw exceptions where needed. Changed Null field to
2216 use new internal class since null cannot be passed to constructor
2217 anymore. Also, fix a coule of small bugs.
2219 2002-05-03 Nick Drochak <ndrochak@gol.com>
2221 * MemoryStream.cs: Refrain from allocating array until the space is
2222 really needed. This fixes a bug in the Length property when the
2223 constructor without the byte array is used.
2225 2002-05-01 Duncan Mak <duncan@ximian.com>
2227 * DirectoryNotFoundException.cs (constructor): Added missing
2228 serialization constructor.
2230 2002-04-30 Duncan Mak <duncan@ximian.com>
2232 * FileLoadException.cs (constructors): Added missing (string,
2233 string) ctor, as well as (string, string, Exception) ctor.
2235 (Message): Added more info to the error message
2237 (ToString): Added. We'll need to add the StackTrace stuff when
2240 * FileShare.cs: Add a missing field, Inheritable.
2242 * TextReader.cs: Renamed Synchronised method to Synchronized.
2244 * TextWriter.cs: Renamed Synchronised method to Synchronized.
2245 Renamed protected member coreNewLine to CoreNewLine.
2247 2002-04-30 Sergey Chaban <serge@wildwestsoftware.com>
2249 * BinaryReader.cs: Allocate buffer before its first use.
2250 Handle end of stream properly. Methods to read native types
2251 (ReadInt* etc.) are little-endian (see Compact Framework docs).
2253 * BinaryWriter.cs: Store data in little-endian format.
2254 Use internal buffer for conversions.
2256 2002-03-31 Dick Porter <dick@ximian.com>
2258 * Directory.cs: Strip out "." and ".." from returned list
2260 * FileAttributes.cs: Get the right enum values
2262 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
2264 * TextWriter.cs (write): added check for null
2266 2002-03-28 Dan Lewis <dihlewis@yahoo.co.uk>
2268 * Directory.cs: Throws DirectoryNotFoundException.
2269 * MonoIO.cs: Fixed to work around enum problem.
2271 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
2273 * StreamReader.cs: Implemented ReadLine() and ReadEnd().
2275 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
2277 * Directory.cs, File.cs, FileSystemInfo.cs, FileInfo.cs,
2278 DirectoryInfo.cs, Path.cs: Modified to use MonoIO class instead of
2279 wrapper and PAL classes.
2281 * MonoIO.cs, MonoIOStat.cs, MonoIOError.cs: Added.
2283 2002-03-25 Mike Kestner <mkestner@speakeasy.net>
2285 * MemoryStream.cs (Read): Fixed bug in exception throw.
2287 2002-03-24 Mike Kestner <mkestner@speakeasy.net>
2289 * StreamReader.cs (ReadBuffer): Fix buffer merging bugs.
2291 2002-03-23 Martin Baulig <martin@gnome.org>
2293 * StreamReader.cs: Always do buffered reading, use 4k blocks.
2294 (Read (char[], int, int)): Implemented.
2295 (DiscardBufferedData): Implemented.
2297 2002-03-21 Mike Kestner <mkestner@speakeasy.net>
2299 * StreamReader.cs : Fill out, add buffering, and use encoding.
2301 2002-03-19 Martin Baulig <martin@gnome.org>
2303 * StreamWriter.cs (StreamWriter (string)): The default is to override
2304 the file, not to append to it.
2305 (StreamWriter (string path, bool append)): When appending, seek to the
2306 end of the file, otherwise truncate the file to zero length.
2307 (Dispose (bool)): Close the internalStream.
2308 (Flush): Flush the interalStream.
2309 (Write (char[], int, int)): Flush the internalStream in auto-flush-mode.
2311 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
2313 * FileStream.cs: Flush buffer before FileSetLength.
2315 2002-02-28 Miguel de Icaza <miguel@ximian.com>
2317 * Stream.cs (NullStream): Do not track position, this beast does
2318 nothing in practice.
2320 2002-03-15 Dan Lewis <dihlewis@yahoo.co.uk>
2322 * SearchPattern.cs: New class. Glob matching code for Directory.
2323 * Directory.cs: Changed to use SearchPattern instead of mono_glob_*()
2325 2002/03/15 Nick Drochak <ndrochak@gol.com>
2327 * DirectoryInfo.cs: Fixed the overloaded GetDirectories and GetFiles.
2328 This code seemed to be copied from somewhere, and it was close,
2329 but didn't match the docs. This was the last bit needed to get
2330 NAnt to compile with our class libs.
2332 2002-03-12 Duncan Mak <duncan@ximian.com>
2334 * EndOfStreamException.cs:
2335 * FileLoadException.cs:
2336 * FileNotFoundException.cs:
2337 * PathTooLongException.cs: Changed the base classes to IOException
2338 instead of SystemException.
2340 * IOException.cs: Added missing constructors.
2342 2002-03-07 Nick Drochak <ndrochak@gol.com>
2344 * FileMode.cs: Docs don't say this should be explicitly derived from
2345 int, so just make it a normal Enum.
2347 2002-03-02 Jason Diamond <jason@injektilo.org>
2349 * StringReader.cs: Fixed off-by-one error in Peek() and Read().
2351 2002-02-12 Nick Drochak <ndrochak@gol.com>
2353 * PathTooLongException.cs: put it in the correct namespace
2354 * EndOfStreamException.cs: put it in the correct namespace
2356 Thu Jan 31 17:32:32 CET 2002 Paolo Molaro <lupus@ximian.com>
2358 * Directory.cs: handle opendir() return NULL and absolute filenames.
2360 2002-01-31 Duncan Mak <duncan@ximian.com>
2362 * FileLoadException.cs:
2363 * FileNotFoundException: Added missing bits for serialization.
2365 Thu Jan 24 17:42:54 CET 2002 Paolo Molaro <lupus@ximian.com>
2367 * Directory.cs: allow directories in GetFiles() mask.
2369 2002-01-23 Miguel de Icaza <miguel@ximian.com>
2371 * FileInfo.c (CopyTo, MoveTo): Implement.
2373 * FileStream.cs: Add argument checking to the constructor.
2375 * File.cs: Rewrote most of the file. Implement Copy, Open, Create,
2376 OpenText, OpenWrite, Move. Made pending methods flagged as MonoTODO.
2378 * Directory.cs (Delete): reimplement without using DirectoryInfo.
2379 (Delete): Implement the recursive version.
2380 (GetCreationTime, GetLastWriteTime, GetLastAccessTime): Implement.
2381 (Move): Reimplement.
2382 (getNames): dead code removal.
2384 * Path.cs: define an internal DirectorySeparatorStr that we use in
2387 * Wrapper.cs: Updated to new version.
2389 * DirectoryInfo (Delete): Implement using the Directory API.
2391 * DirectoryInfo.cs (GetFiles, GetDirectories, GetFileSystemInfos,
2392 Delete, Create, Parent, Exists, MoveTo): Implement.
2394 * Directory.cs (GetListing): implement new utility function.
2395 (GetDirectories): Implement.
2396 (GetFileSystemEntries): Implement.
2397 (GetFiles): Implement.
2399 * CheckArgument.cs (Path): Do not allow null by default.
2401 Tue Jan 22 22:53:23 CET 2002 Paolo Molaro <lupus@ximian.com>
2403 * DirectoryInfo.cs, FileInfo.cs: do not use Debug from the system
2406 2002-01-20 Nick Drochak <ndrochak@gol.com>
2408 * SeekOrigin.cs: Added Serializable attribute.
2410 2002-01-19 Duncan Mak <duncan@ximian.com>
2412 * PathTooLongException.cs:
2413 * EndOfStreamException.cs: Added to CVS.
2415 Thu Jan 10 12:06:46 MST 2002 Matt Kimball <matt@kimball.net>
2417 * BufferedStream.cs: Initial implemenation. The synchronous
2418 methods for both reading and writing are implemented. I'll do the
2419 asynchronous methods in a bit.
2421 Wed Jan 9 16:04:39 MST 2002 Matt Kimball <matt@kimball.net>
2423 * BinaryWriter.cs: Initial implementation. And it's all there.
2425 * BinaryReader.cs: The constructor now uses the passed in encoding,
2428 Wed Jan 9 13:54:28 MST 2002 Matt Kimball <matt@kimbal.net>
2430 * BinaryReader.cs: Initial implementation. I think it's complete.
2432 2002-01-04 Ravi Pratap <ravi@ximian.com>
2434 * CheckArgument.cs, CheckPermission.cs, Directory.cs: MonoTODO
2435 attribute decorations.
2437 * DirectoryInfo.cs, File.cs, FileInfo.cs, FileSystemInfo.cs,
2438 Path.cs, TextReader.cs, TextWriter.cs : Ditto.
2440 * FileLoadException.cs, FileNotFoundException.cs, StreamReader.cs:
2443 2001-12-11 Dick Porter <dick@ximian.com>
2445 * FileStream.cs: Use handles rather than casting file descriptors.
2446 Added Handle property.
2448 Wed Nov 14 16:47:47 CET 2001 Paolo Molaro <lupus@ximian.com>
2450 * CheckPermission.cs: disable ModeAccess() code: it's wrong.
2451 * FileStream.cs: only trow an exception if the read failed in ReadByte().
2452 * StreamReader.cs: implement Peek and Read.
2453 * TextWriter.cs: CLSCompliant updates.
2455 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
2457 * FileNotFoundException.cs: Added some constructors
2459 * Path.cs (GetFullPath): Fixed implementation
2461 Fri Nov 2 18:27:58 CET 2001 Paolo Molaro <lupus@ximian.com>
2463 * DirectoryNotFoundException.cs: implemented.
2465 Tue Sep 25 18:54:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
2467 * File.cs: fix signatures of the Open() and OpenRead() functions
2470 Thu Sep 13 18:04:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
2472 * FileLoadException.cs, FileNotFoundException.cs: added.
2474 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
2476 * TextReader.cs: implemented the Read method
2478 * StreamReader.cs: impl. stubs
2480 * StreamWriter.cs: impl.
2482 * TextWriter.cs: implemented Write and WriteLine methods
2484 Sun Aug 26 23:01:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
2486 * FileAccess.cs, FileMode.cs: change values to be compatible with
2489 Sun Aug 26 11:47:56 CEST 2001 Paolo Molaro <lupus@ximian.com>
2491 * IOException.cs: Implemented System.IO.Exception.
2493 2001-07-18 Michael Lambert <michaellambert@email.com>
2495 *SeekOrigin.cs.cs, FileShare.cs, FileMode.cs, FileAccess.cs: Add.
2497 2001-07-19 Marcin Szczepanski <marcins@zipworld.com.au>
2499 * System.IO.MemoryStream.cs: Added. Had quite a few cases of
2500 "LAMESPEC", but the tests work against the MS implementation so
2501 the major functions are right (ie. Read/Write/Seek). Some more
2502 tests required for the various constructors and exceptions.
2504 2001-07-16 Marcin Szczepanski <marcins@zipworld.com.au>
2506 * StringReader.cs, StringWriter.cs, TextReader.cs, TextWriter.cs:
2507 New class implemenations.
2509 * StringReaderTest.cs, StringWriterTest.cs: Test suite for the above.