* Path.cs (GetRandomFileName): Return filenames containing only
characters from the range [a..z0..9] as MS.NET does.
svn path=/trunk/mcs/; revision=89869
* StreamReader.cs : Encoding.GetMaxCharCount() does not always return
the maximum max char count for Decoder.GetChars() since it might
contain pending buffer by flush. Fixed bug #338370.
svn path=/trunk/mcs/; revision=88712
* Path.cs (GetDirectoryName): The paths returned from this routine
should be canonical, not just a substring. In addition to fixing
this, it also fixes#324742.
svn path=/trunk/mcs/; revision=88708
* Encoding.cs : added UTF8UnmarkedUnsafe, for old empty replacement
UTF8.
* BinaryReader.cs, BinaryWriter.cs : use unsafe encoding that has ""
for replacement fallback. Binary serialization regression is fixed.
svn path=/trunk/mcs/; revision=88276
* Stream.cs, BufferedStream.cs, MemoryStream.cs: in 2.0 override
Dispose(bool) rather than Close().
Stream.Dispose() is virtual in 2.0.
svn path=/trunk/mcs/; revision=85389
Implementing System.IO.File.Replace
*File.cs: Add implementation for IO.File.Replace methods.
*MonoIO.cs: Declared an internal call for ReplaceFile
*FileTest.cs: Added a test for IO.File.Replace.
Code is contributed under MIT/X11 license.
svn path=/trunk/mcs/; revision=84485
used to move files, patch by Robert Jordan. Fixes bug #81912. Spaces
to tabs.
* DirectoryCas.cs: Changed Move to MoveDirectory to match the
method in DirectoryTest. Fixed line endings.
* DirectoryTest.cs: Added test for bug #81912. Added tests for Move
argument checks.
svn path=/trunk/mcs/; revision=81599
to read bytes as this allows us to start reading from the current
position. In Read, return 0 when reading beyond the end of the stream
and only read bytes until the end of the stream (not capacity).
In ReadByte, return -1 when reading beyond the end of the stream.
In SetLength: changed argument validation (and reported exceptions) to
match MS, removed duplicate access check and changed the current
position if length is less than position. In Write: throw
NotSupportedException when attempting to write beyond capacity, use
Marshal.WriteByte since that allows us to start writing from the
current position. Adjust length when position moves beyond length
in both Write and WriteByte. Allow position to be moved beyond
capacity of stream. Fixed position using Seek (=+ typo). Changed
CanRead to ignore current position. Allow Position to be used to move
beyond capacity of stream.
* UnmanagedMemoryStreamTest.cs: Added tests for CanRead, CanSeek,
CanWrite, Seek, Write. Improved existing tests for SetLength,
Position. Enabled tests that were previously failing.
svn path=/trunk/mcs/; revision=77972
more. Tests were previously ignored by NUnit because the SetUp method
was private.
* UnmanagedMemoryStream.cs: Changed argument names and exceptions
(msg, params) to match MS. Verify access argument in ctor.
svn path=/trunk/mcs/; revision=77894
* FileStream.cs: Respect request for buffering in all cases.
Gonzalo added code in r42667 that disables buffering even when it is
requested, in the case that ftype != MonoFileType.Disk. This was
killing performance for users who do Console.OpenStandardOutput(1024)
but were ending up with a non-buffered FileStream.
The new behaviour appears correct but we should watch for any
regressions.
svn path=/trunk/mcs/; revision=76038
* UnmanagedMemoryStream.cs: Should not have a public Dispose().
This behaviour is already provided by the base class.
svn path=/trunk/mcs/; revision=75324
* Path.cs: Manually call FileStream and pass the new internal
FileOptions.1 flag that means "This is a temporary file, use 600
permissions".
* FileOptions.cs: Document the new private enum value.
svn path=/trunk/mcs/; revision=73771
in anonymous mode.
* FileStreamTest.cs: Added and improved tests to verify whether the
reported exceptions match that of MS.
svn path=/trunk/mcs/; revision=72048
* StreamReader.cs: fix for bug #75526. We return earlier from Read () if
the underlying stream might block or end on the next read.
svn path=/trunk/mcs/; revision=71650
* StreamReader.cs (Read): Fix this overload, we were just lucky
that it worked in the past. Must trigger a load from the buffer
if we reached its end.
svn path=/trunk/mcs/; revision=71573
* DirectoryInfo.cs: Throw a better exception (accorind go the
docs, UnauthorizedAccessException is thrown if the underlying
platform does not support it and *also* if there are no
permissions to access it, which is more convenient than the
PlatformNotSupportedException that only states that it needs Win2k
or newer).
svn path=/trunk/mcs/; revision=71457
* File.cs: Add stubs for Encrypt and Decrypt that throws
NotSupportedException just like non-NTFS file systems would with MS.
Remove nested #if NET_2_0.
* FileInfo.cs: Add stubs for Encrypt and Decrypt that throws
NotSupportedException just like non-NTFS file systems would with MS.
svn path=/trunk/mcs/; revision=69956