* 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
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
* FileStream.cs: Implement the FileOptions usage by passing all
the information to the C layer. Remove the "isAsync" argument for
MonoIO.Open, and instead pass it on the FileOptions.
* FileOptions.cs: Make it build when including WriteThrough
* MonoIO.cs: Update MonoIO.Open signature to drop the async
argument and take FileOptions instead.
2006-04-26 Miguel de Icaza <[email protected]>
* MethodBuilder.cs: better error messages when we close the
method.
svn path=/trunk/mcs/; revision=59960
profile. This fixes bug #77644. Improved usefulness of some existing
exception messages.
* FileStreamTest.cs: Fixed tests for invalid share value to pass on
MS.NET 2.0, and all Mono profiles. Added test that verifies the
correct behavior of all possible FileMode and FileAccess combinations.
Fixed compiler warning.
svn path=/trunk/mcs/; revision=57337
* Directory.cs: Added a Demand for Read/Write when creating a new
directory.
* FileSystemInfo.cs: Added an InheritanceDemand for Unrestricted on
the class.
* Path.cs: Added a Demand for PathDiscovery in GetFullPath method.
Added an Assert for unrestricted file access to GetTempFilename as
the method must create the (zero-length) file and can be called from
partially trusted code. Added a Demand for unrestricted environment
access to GetTempPath method.
* FileStream.cs: Added a Demand for UnmanagedCode for all constructors
accepting a file handle. Added LinkDemand and InheritanceDemand for
UnmanagedCode to get Handle and SafeFileHandle (2.0) properties.
svn path=/trunk/mcs/; revision=42212
* FileStream.cs: Anonymize part of the path when exceptions are throw
by a FileStream is used for isolated storage. Throw a DirectoryNotFound
Exception for any FileMode not just CreateNew (see new unit tests).
svn path=/trunk/mcs/; revision=41855
* FileStream.cs: Added new constructor to allow anonymous files (i.e.
when Name property is "[Unknown]") for IsolatedStorage. Added
SafeFileHandle property and a reference to Microsoft.Win32.SafeHandles
for the NET_2_0 profile.
svn path=/trunk/mcs/; revision=39861
* CheckPermission.cs:
* File.cs:
* FileInfo.cs:
* MonoIO.cs:
* FileStream.cs: Give the filename when throwing
FileNotFoundException. Fixes bug 61120, based on patch from
Carlos Alberto Cesario <[email protected]>.
svn path=/trunk/mcs/; revision=30744
appropriate Exceptions here instead.
* FileStream.cs (SetLength): Revert part of my last patch, we're
throwing ObjectDisposedException instead of IOException again.
svn path=/trunk/mcs/; revision=29123
over ObjectDisposedException, which is not one of the exceptions
listed in the documentation). Also, instead of throwing an
ObjectDisposedException, throw an IOException.
* FileStreamTest.cs (SetLengthWithClosedBaseStream): New test for
checking that the correct exception is thrown when the base stream
is closed.
svn path=/trunk/mcs/; revision=28993
* BufferedStream.cs: Fixed Seek logic (check for CanSeek and dispose).
SetLength must also reset Position and check for dispose.
* FileStream.cs: Added missing check for invalid SeekOrigin.
svn path=/trunk/mcs/; revision=28490
* FileStream.cs: delay seeking to the end when FileMode.Append is
specified until after buffer initialization. Fixes bug #59151.
svn path=/trunk/mcs/; revision=28222
* FileStream.cs: only pass the async flag set to true when opening the
file and AIO is supported by the underlying system. Fixes bug #56883.
svn path=/trunk/mcs/; revision=25597
a direct call to ReadData. In InitBuffer(), if buffering is disabled,
create a buffer of one byte, to be used in ReadByte.
This fixes bug #52361.
svn path=/trunk/mcs/; revision=24589
* corlib.dll.sources: added StreamAsyncResult and FileStreamAsyncResult.
* System/Environment.cs: updated corlib version.
* System.IO/FileStream.cs: added support for asynchronous I/O without
using the OS native libraries if available.
* System.IO/FileStreamAsyncResult.cs: IAsyncResult for asynch. I/O.
* System.IO/MonoIO.cs: added BeginRead/Write, GetSupportsAsync. Open
has now a new parameter to tell ifthe file will be used for asynch.
operations.
* System.IO/Stream.cs: BeginRead/Write do not use delegates. They just
are actually synchronous.
* System.IO/StreamAsyncResult.cs: IAsyncResult for Stream.
* System.Threading/NativeOverlapped.cs: added 2 new internal fields.
* System.Threading/Overlapped.cs: implemented, but it's not used.
* System.Threading/ThreadPool.cs: implemented BindHandle.
svn path=/trunk/mcs/; revision=24069
* FileStream.cs: (.ctor) Path.DirectoryName can be empty and make
Path.GetFullPath crash. Fixed it.
* MonoIO.cs: fixed typo.
svn path=/trunk/mcs/; revision=23257
params. Fixes some unit test failures.
* BufferedStream.cs: If the stream is closed (can't read from it
or write to it) throw an ObjectDisposedException.
svn path=/trunk/mcs/; revision=23074
* FileStream.cs: Locking from bug #32344 removed. This is not
necessary because the correct fix was actually in the console.
This fixes bug #53026. Miguel de Icaza reviewed/approved this
patch.
svn path=/trunk/mcs/; revision=22224
* FileStream.cs: (.ctor) do not set handle
in object until after it is validated via
GetFileType so finalizer doesn't see bad handles
svn path=/trunk/mcs/; revision=21437
* FileStream.cs: use the argument name when throwing exception.
* StreamReader.cs:
* StringReader.cs:
* TextReader.cs: added [In] attribute for the array in Read.
svn path=/trunk/mcs/; revision=19987
* FileStream.cs public FileStream (string name, FileMode mode)
constructor: If we pass FileMode.Append, we can not pass
FileAccess.ReadWrite. This fixes bug 44959
svn path=/trunk/mcs/; revision=19215