Commit Graph
444 Commits
Author SHA1 Message Date
Zoltan Varga 2d28c06ed2 2008-01-16 Zoltan Varga <[email protected]>
* BinaryReader.cs: Fix ReadCharBytes method to avoid non-linear behavior. 
	Fixes #352184.

svn path=/trunk/mcs/; revision=93049
2008-01-16 15:58:41 +00:00
Zoltan Varga 35a99a9511 2007-12-28 Zoltan Varga <[email protected]>
* MemoryStream.cs: Fix crash if internalBuffer is null. Avoid calling
	unsafe icalls. Fixes #350860.

svn path=/trunk/mcs/; revision=91971
2007-12-28 00:39:33 +00:00
Atsushi Eno ac879a3ea0 2007-11-21 Atsushi Enomoto <[email protected]>
* FileStream.cs : Close() does not exist in 2.0 (Stream does).
	  Move GC.SuppressFinalize() to Dispose(true).


svn path=/trunk/mcs/; revision=90095
2007-11-21 17:27:29 +00:00
Jb Evain 0eb1105589 2007-11-12 Juraj Skripsky <[email protected]>
* Path.cs (GetRandomFileName): Return filenames containing only
	characters from the range [a..z0..9] as MS.NET does. 


svn path=/trunk/mcs/; revision=89869
2007-11-17 19:29:36 +00:00
Atsushi Eno d26a2ab039 2007-11-02 Atsushi Enomoto <[email protected]>
* 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
2007-11-02 09:37:12 +00:00
Miguel de Icaza c97c647b23 2007-11-01 Miguel de Icaza <[email protected]>
* 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
2007-11-02 03:47:10 +00:00
Atsushi Eno 4089f586b1 2007-10-26 Atsushi Enomoto <[email protected]>
* 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
2007-10-26 17:27:23 +00:00
Atsushi Eno 79faeec3d3 2007-09-06 Atsushi Enomoto <[email protected]>
* 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
2007-09-06 05:18:18 +00:00
Gert Driesen ce9892f0a0 * BinaryReader.cs: Fixed line endings.
* FileStream.cs: Rename name argument to path. Spaces to tabs.

svn path=/trunk/mcs/; revision=84797
2007-08-24 10:51:01 +00:00
Bill Holmes f18043102f 2007-08-20 William Holmes <[email protected]>
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
2007-08-20 18:48:55 +00:00
Dick Porter ced82e1238 2007-07-31 Dick Porter <[email protected]>
* MonoIO.cs: Fix formatting of 'access denied' exception when the
	path info isn't known.  Fixes bug 82141.



svn path=/trunk/mcs/; revision=83096
2007-07-31 15:35:04 +00:00
Gert Driesen f21385dd39 * Directory.cs: Renamed Move arguments to match MS. Allow Move to be
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
2007-07-08 15:56:55 +00:00
Dick Porter 8b2b1773d3 2007-06-21 Dick Porter <[email protected]>
* FileStream.cs: Fix FileShare test, fixing better bug 79250.



svn path=/trunk/mcs/; revision=80493
2007-06-21 16:22:27 +00:00
Atsushi Eno c98ee48759 2007-05-28 Atsushi Enomoto <[email protected]>
* IResourceWriter.cs NeutralResourcesLanguageAttribute.cs
	  SatelliteContractVersionAttribute.cs ResourceManager.cs
	  IResourceReader.cs ResourceSet.cs ResourceWriter.cs
	  ResourceReader.cs UltimateResourceFallbackLocation.cs
	  MissingManifestResourceException.cs :
	  implemented 2.0 resource support (write, and remaining read bits)
	  and GetStream(). Cosmetic attributes fixes.

	* UnmanagedMemoryStream.cs : added Closed event for sys.Resources use.
	* IntPtrStream.cs : added internal get_BaseAddress(), for the same.

	* ResourceManagerTest.cs : added tests for GetStream() (including
	  2.0 resource format tests).


svn path=/trunk/mcs/; revision=78024
2007-05-28 03:35:21 +00:00
Gert Driesen 2c9729cdbc * UnmanagedMemoryStream.cs: In Read and ReadByte, use Marshal.ReadByte
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
2007-05-25 20:22:40 +00:00
Gert Driesen 0b28cba334 * UnmanagedMemoryStreamTest.cs: Fixed several tests and added several
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
2007-05-24 08:14:45 +00:00
Atsushi Eno b6a43591a1 2007-05-23 Atsushi Enomoto <[email protected]>
* UnmanagedMemoryStream.cs : couple of bugfixes. in Read(), don't
	  return buffer beyond the requested length. Fixed .ctor() for wrong
	  capacity initialization.


svn path=/trunk/mcs/; revision=77823
2007-05-23 04:31:06 +00:00
Jonathan Chambers 98c320154e 2007-05-12 Jonathan Chambers <[email protected]>
* FileStream.cs: Implement SafeHandle constructors.


svn path=/trunk/mcs/; revision=77278
2007-05-12 15:03:37 +00:00
Dick Porter bf9bb4bc89 2007-05-01 Dick Porter <[email protected]>
* File.cs:
	* Stream.cs: Missed a few 2.0 methods

2007-05-01  Dick Porter  <[email protected]>

	* RegistryKeyPermissionCheck.cs: Not serializable



svn path=/trunk/mcs/; revision=76523
2007-05-01 11:08:28 +00:00
Dick Porter 5b79519900 2007-04-30 Dick Porter <[email protected]>
* Directory.cs: 
	* FileShare.cs: 
	* DirectoryNotFoundException.cs: 
	* SeekOrigin.cs: 
	* FileAttributes.cs: 
	* IOException.cs: 
	* MemoryStream.cs: 
	* FileMode.cs: 
	* BinaryWriter.cs: 
	* TextWriter.cs: 
	* File.cs: 
	* BinaryReader.cs: 
	* TextReader.cs: 
	* UnmanagedMemoryStream.cs: 
	* StringWriter.cs: 
	* FileAccess.cs: 
	* FileLoadException.cs: 
	* BufferedStream.cs: 
	* Stream.cs: 
	* FileInfo.cs: 
	* FileStream.cs:
	* StringReader.cs: 
	* StreamWriter.cs: 
	* EndOfStreamException.cs: 
	* DriveInfo.cs: 
	* StreamReader.cs: 
	* PathTooLongException.cs: 
	* DriveType.cs: 
	* FileNotFoundException.cs: 2.0 profile updates



svn path=/trunk/mcs/; revision=76495
2007-04-30 14:05:12 +00:00
Dick Porter 37bc149b80 Reinstate this change.
2007-04-05  Dick Porter  <[email protected]>

	* Directory.cs: Pass combined path and pattern to
	MonoIO.GetFileSystemEntries()



svn path=/trunk/mcs/; revision=76250
2007-04-25 13:53:05 +00:00
Alp Toker 1f9ae123bc 2007-04-21 Alp Toker <[email protected]>
* 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
2007-04-21 08:18:30 +00:00
Dick Porter d162abe1b3 Revert this while I figure out why monodevelop breaks
svn path=/trunk/mcs/; revision=75777
2007-04-16 17:02:22 +00:00
Dick Porter acacb61e04 2007-04-05 Dick Porter <[email protected]>
* Directory.cs: Pass combined path and pattern to
	MonoIO.GetFileSystemEntries()

2007-04-05  Dick Porter  <[email protected]>

	* Environment.cs: Increment mono_corlib_version



svn path=/trunk/mcs/; revision=75432
2007-04-05 12:43:26 +00:00
Alp Toker c5d804e0ab 2007-04-03 Alp Toker <[email protected]>
* UnmanagedMemoryStream.cs: Should not have a public Dispose().
	This behaviour is already provided by the base class.


svn path=/trunk/mcs/; revision=75324
2007-04-03 07:30:10 +00:00
Alp Toker 562e403345 2007-04-03 Alp Toker <[email protected]>
* Stream.cs: CreateWaitHandle() obsolete in 2.0.


svn path=/trunk/mcs/; revision=75322
2007-04-03 07:10:58 +00:00
Alp Toker d7dc652806 2007-03-18 Alp Toker <[email protected]>
* UnmanagedMemoryStream.cs:
	* Directory.cs: Exception message typo fixes.


svn path=/trunk/mcs/; revision=74573
2007-03-18 22:04:17 +00:00
Zoltan Varga 7ef1815623 2007-03-11 Zoltan Varga <[email protected]>
* UnmanagedMemoryStream.cs: Fix a warning.

svn path=/trunk/mcs/; revision=74067
2007-03-11 14:24:28 +00:00
Miguel de Icaza 937185f945 2007-03-05 Miguel de Icaza <[email protected]>
* 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
2007-03-06 00:46:44 +00:00
Dick Porter 025c9917e4 2007-02-22 Dick Porter <[email protected]>
* MonoIOError.cs: 
	* MonoIO.cs: Handle ERROR_CANNOT_MAKE.



svn path=/trunk/mcs/; revision=73322
2007-02-22 16:21:13 +00:00
Eyal Alalouf fbd34a95a9 Use MonoNotSupported & MonoLimitation attribute to tag that DirectorySecurity is not supported.
svn path=/trunk/mcs/; revision=73302
2007-02-22 10:25:25 +00:00
Boris Kirzner e186082db9 Fix order of InvalidPathChars on windows.
svn path=/trunk/mcs/; revision=73099
2007-02-19 09:25:40 +00:00
Miguel de Icaza 3a23274a17 Revert Patch 72756 until we review and discuss this publicly
svn path=/trunk/mcs/; revision=72768
2007-02-13 13:07:41 +00:00
Boris Kirzner 04052b1827 Path handling fixes in File, Directory and Path including windows-specific negative flows.
svn path=/trunk/mcs/; revision=72756
2007-02-13 12:04:32 +00:00
Gert Driesen 41268b2207 * StreamReader.cs: Removed checks for non-existing directory or file,
since these checks are also performed in FileStream.

svn path=/trunk/mcs/; revision=72058
2007-01-31 22:31:10 +00:00
Gert Driesen 6dd8ccef86 * FileStream.cs: Always resolve to absolute paths for exceptions, when not
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
2007-01-31 19:26:17 +00:00
Gonzalo Paniagua Javier 167ec9bddd 2007-01-24 Gonzalo Paniagua Javier <[email protected]>
* 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
2007-01-25 06:12:54 +00:00
Miguel de Icaza 93e6ec21f7 revert, this was a mistake
svn path=/trunk/mcs/; revision=71617
2007-01-24 18:37:03 +00:00
Miguel de Icaza ec090a9505 2007-01-23 Miguel de Icaza <[email protected]>
* 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
2007-01-24 00:45:35 +00:00
Miguel de Icaza d3b0757c7d 2007-01-22 Miguel de Icaza <[email protected]>
* 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
2007-01-22 20:16:08 +00:00
Alp Toker dfc3ae9bf9 2006-12-23 Alp Toker <[email protected]>
* Directory.cs: "platfor" typofix


svn path=/trunk/mcs/; revision=70005
2006-12-23 23:58:19 +00:00
Sebastien Pouliot ff518b0de4 2006-12-22 Sebastien Pouliot <[email protected]>
* 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
2006-12-22 18:21:25 +00:00
Atsushi Eno ed62a988d2 2006-12-22 Atsushi Enomoto <[email protected]>
* Directory.cs : non NET_2_0 build fix.


svn path=/trunk/mcs/; revision=69926
2006-12-22 09:26:33 +00:00
Miguel de Icaza 5b97fe374e 2006-12-15 Miguel de Icaza <[email protected]>
* FileInfo.cs: Empty implementations for Encrypt and Decrypt

svn path=/trunk/mcs/; revision=69523
2006-12-15 05:24:32 +00:00
Paolo Molaro c772628c52 Mon Dec 11 11:40:06 CET 2006 Paolo Molaro <[email protected]>
* FileStream.cs: correct exception message patch from
	Markus Mauhart <[email protected]>.


svn path=/trunk/mcs/; revision=69308
2006-12-11 10:42:05 +00:00
Duncan Mak 2bf1fe15bb Fix 2.0 buglets exposed by the MOMA tool.
2006-11-28  Duncan Mak  <[email protected]>

	* TextReader.cs (Dispose): Expose as public in NET_2_0.

2006-11-28  Duncan Mak  <[email protected]>

	* ArgumentNullException.cs (.ctor): Added new constructor that's
	new in .NET 2.0.

	* InsufficientMemoryException.cs: Added missing 2.0 exception.

svn path=/trunk/mcs/; revision=68632
2006-11-29 01:46:18 +00:00
Miguel de Icaza fa184a2f20 Pending changelog
svn path=/trunk/mcs/; revision=68540
2006-11-27 23:23:41 +00:00
Miguel de Icaza 8a1af5fd38 2006-11-16 Miguel de Icaza <[email protected]>
* DirectoryInfo.cs (GetFiles): Implement option with SearchOptions
	== AllDirectories

And a lot of MonoTODOs updated as well


svn path=/trunk/mcs/; revision=67998
2006-11-16 14:14:01 +00:00
Dick Porter 096b024496 2006-11-13 Dick Porter <[email protected]>
* Directory.cs: Don't follow symlinks when deleting directories.
        Keeps bug 79733 fixed while fixing bug 79887.

        * MonoIO.cs: ExistsSymlink() added, which checks for
        FileAttributes.ReparsePoint.



svn path=/trunk/mcs/; revision=67767
2006-11-13 17:02:17 +00:00
Dick Porter 3d4073e105 2006-11-07 Dick Porter <[email protected]>
* Directory.cs: CreateDirectory() should only throw IOException in
        the 2.0 profile if a file already exists with the same name, not a
        directory.



svn path=/trunk/mcs/; revision=67467
2006-11-07 17:19:34 +00:00