Commit Graph
51 Commits
Author SHA1 Message Date
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 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
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
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
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
Gonzalo Paniagua Javier 464d17fab8 2006-08-03 Gonzalo Paniagua Javier <[email protected]>
* File.cs: (Delete) avoid creating the exception object for the 'file
	not found' case.


svn path=/trunk/mcs/; revision=63296
2006-08-03 14:43:52 +00:00
Gonzalo Paniagua Javier 98b2dabae1 2006-06-06 Gonzalo Paniagua Javier <[email protected]>
* File.cs: never throw in Exists.


svn path=/trunk/mcs/; revision=61504
2006-06-06 20:58:50 +00:00
Atsushi Eno ad24284d1a 2006-04-28 Atsushi Enomoto <[email protected]>
* StreamReader.cs : implemented EndOfStream property.
	* File.cs : implemented AppendAllText(), WriteAllLines(),
	  WriteAllBytes() and ReadAllLines(). Bug #77813 fixed.


svn path=/trunk/mcs/; revision=60046
2006-04-28 17:14:16 +00:00
Gert Driesen 06a833ea77 * File.cs: In 2.0 profile, File.Get****Time(Utc) should not throw
IOException if specified path does not exist. Fixes bug #77641.
* FileTest.cs: In 2.0 profile, no longer expect IOException when path to
non-existing directory or file is specified in Get***Time(Utc) methods
(bug #77641). Renamed tests and removed trailing tabs. Removed
duplicate test. Fixed GetLastWriteTime(Utc) tests that used
GetLastAccessTime(Utc) instead of GetLastWriteTime(Utc).
* DirectoryTest.cs: No longer expect IOException when path to
non-existing directory or file is specified in Get***Time(Utc) methods
(bug #77641).

svn path=/trunk/mcs/; revision=57338
2006-02-27 17:54:48 +00:00
Ben Maurer c770e5b1a4 In Test/System.IO:
2006-01-12  Ben Maurer  <[email protected]>

	* FileTest.cs: Tests tests for read/writealltext.

In System.IO:
2006-01-12  Ben Maurer  <[email protected]>

	* File.cs: Support for Read/WriteAllText


svn path=/trunk/mcs/; revision=55475
2006-01-13 03:22:19 +00:00
Miguel de Icaza fcca32c6f5 2005-05-26 Miguel de Icaza <[email protected]>
* Dictionary.cs: Remove the `Hash' name from the Dictionary
	internal classes, make them public.

2005-05-26  Miguel de Icaza  <[email protected]>

	* File.cs (ReadAllBytes): add.



svn path=/trunk/mcs/; revision=45058
2005-05-26 15:52:42 +00:00
Ben Maurer 5cbfa93c6e In Test/System.IO:
2005-05-06  Ben Maurer  <[email protected]>

	* FileTest.cs (OpenAppend): Test for #71088.

In System.IO:
2005-05-06  Ben Maurer  <[email protected]>

	* File.cs (Open): If a stream is opened with Append access, you
	only want Write access. Fixes bug #71088.


svn path=/trunk/mcs/; revision=44163
2005-05-06 19:57:29 +00:00
Gonzalo Paniagua Javier 82c2339c3d 2005-02-06 Gonzalo Paniagua Javier <[email protected]>
* Test/System.IO/FileTest.cs: test for invalid characters in file names.
	* System.IO/File.cs: Exists does not throw when there are invalid
	characters in the file name.
	* System.IO/MonoIOError.cs: uncommented INVALID_NAME.


svn path=/trunk/mcs/; revision=40208
2005-02-06 17:10:45 +00:00
Gonzalo Paniagua Javier 3e0146e95b 2004-12-13 Gonzalo Paniagua Javier <[email protected]>
* File.cs: delegate to the runtime the task of checking for destination
	file existence in Move.


svn path=/trunk/mcs/; revision=37714
2004-12-14 03:43:25 +00:00
Miguel de Icaza d83f3856a1 Fix ArgumentNullException arguments, thanks Sebastien
svn path=/trunk/mcs/; revision=33600
2004-09-08 23:11:56 +00:00
Miguel de Icaza 046cc83ddc 2004-09-08 Miguel de Icaza <[email protected]>
* File.cs: Added Gettextification, provide a better error message
	for #62112
2004-09-08  Miguel de Icaza  <[email protected]>

	* Locale.cs: Added overload that calls String.Format.

svn path=/trunk/mcs/; revision=33597
2004-09-08 22:12:40 +00:00
Marek Safar 92587190c7 2004-09-08 Marek Safar <[email protected]>
* Directory.cs,
	* File.cs: Class is static for NET_2_0.

svn path=/trunk/mcs/; revision=33575
2004-09-08 13:56:24 +00:00
Dick Porter 55e8d9fe73 2004-07-05 Dick Porter <[email protected]>
* 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
2004-07-05 15:05:43 +00:00
Dick Porter 5fd2b136bf 2004-07-05 Dick Porter <[email protected]>
* File.cs: File.Move() should check that the destination doesn't
	already exist.  Fixes bug 60915, patch based on one from Carlos
	Alberto Cesario <[email protected]>.

svn path=/trunk/mcs/; revision=30741
2004-07-05 14:30:28 +00:00
Atsushi Eno 5412643255 2004-06-21 Atsushi Enomoto <[email protected]>
* FileStream.cs : Check buffer size before creating file.
	* StreamReader.cs : Check encoding!=null before creating file.
	* File.cs,
	  MonoIO.cs : Convert DateTime to FileTime after checking
	  file IO sharing violation (it just fixes the type of exception).

svn path=/trunk/mcs/; revision=30033
2004-06-21 13:30:46 +00:00
Dick Porter ac70de62f3 2004-06-14 Dick Porter <[email protected]>
* Directory.cs:
	* File.cs: Catch PATH_NOT_FOUND errors in Exists() too.  Fixes bug
	59354.

svn path=/trunk/mcs/; revision=29497
2004-06-14 13:18:13 +00:00
Duncan Mak 13d1764537 Add license and copyright to all source files in corlib
svn path=/trunk/mcs/; revision=29249
2004-06-11 02:09:36 +00:00
Duncan Mak 3f9d81d821 * File.cs: Fix line endings, took out ^Ms.
* Directory.cs (GetParent): Return null if the specified path is
the root directory.

svn path=/trunk/mcs/; revision=29061
2004-06-08 20:09:19 +00:00
Atsushi Eno 4557407d6d 2004-05-31 Atsushi Enomoto <[email protected]>
* Directory.cs, File.cs : Fixed Exists() that raised
	  DirectoryNotFoundException. Quick fix for bug #59354.

svn path=/trunk/mcs/; revision=28557
2004-05-31 16:44:03 +00:00
Dick Porter d024688825 2004-05-27 Dick Porter <[email protected]>
* MonoIO.cs: Define icalls for Lock() and Unlock()

	* FileStream.cs: Implement Lock() and Unlock().  Also improve IO
	error reporting.

	* FileSystemInfo.cs:
	* File.cs:
	* Directory.cs: Improve IO error reporting

svn path=/trunk/mcs/; revision=28285
2004-05-27 16:25:27 +00:00
Lluis Sanchez a186746a8a * File.cs: In Move, throw IOException instead of ArgumentException if destination
is a directory.
	* MonoIO.cs: In ExistsDirectory, return ERROR_PATH_NOT_FOUND instead of
	  ERROR_FILE_NOT_FOUND, since we are looking for a directory, not a file.

svn path=/trunk/mcs/; revision=24527
2004-03-24 17:24:29 +00:00
Jackson Harper 7b2887c8bf * File.cs: Report the filename when deleting a file fails. Patch
by Gert Driesen. Fixes bug #54855.

svn path=/trunk/mcs/; revision=23464
2004-02-25 19:56:33 +00:00
Zoltan Varga 9490d3d5c7 2003-05-22 Zoltan Varga <[email protected]>
* File.cs (Move): Allow moving of directories.
	Fix 'destination is a directory' test.

svn path=/trunk/mcs/; revision=14795
2003-05-22 11:46:09 +00:00
Ville Palo df627302b0 2003-04-22 Ville Palo <[email protected]>
* Directory.cs: clean up --> performance improvment. Some exceptions
	are now checked in File.cs.
	* File.cs: Implemented Get/SetXXXTimeUtc () methods. Some bugfixes.

svn path=/trunk/mcs/; revision=13903
2003-04-22 18:41:46 +00:00
Gonzalo Paniagua Javier 3786083fc6 2003-02-27 Gonzalo Paniagua Javier <[email protected]>
* File.cs: fix by Elan Feingold <[email protected]> for
	SetCreationTime, SetLastAccessTime and SetLastWriteTime.

svn path=/trunk/mcs/; revision=12029
2003-02-27 16:20:24 +00:00
Nick Drochak 2352aa0cf1 2003-02-25 Nick Drochak <[email protected]>
* File.cs (GetCreationTime): Throw proper execption when path is not
	found.

svn path=/trunk/mcs/; revision=11960
2003-02-25 14:40:10 +00:00
Zoltan Varga a8426777d4 2003-01-28 Zoltan Varga <[email protected]>
* File.cs: add error handling to Get...Time methods.

svn path=/trunk/mcs/; revision=10986
2003-01-28 15:31:02 +00:00
Dick Porter 542709a35c 2002-10-31 Dick Porter <[email protected]>
* FileStream.cs: Fix buffering properly this time.  Also kludge
	around broken pipe errors, treating them as EOF instead of
	throwing an IO exception.

	* MonoIO.cs: Return the error status in a parameter, as the
	GetLastError() value has long since been blown away if we try and
	look it up in a subsequent internal call invocation.

	* Process.cs:
	* Environment.cs:
	* FileSystemInfo.cs:
	* FileInfo.cs:
	* File.cs:
	* Directory.cs: MonoIO methods now have an error parameter

2002-10-31  Dick Porter  <[email protected]>

	* list.unix: Added MonoIO and MonoIOError to the build

svn path=/trunk/mcs/; revision=8712
2002-10-31 15:55:48 +00:00
Miguel de Icaza 8c50416580 2002-08-21 Miguel de Icaza <[email protected]>
* Environment.cs: Implemented OSVersion property.

2002-08-21  Miguel de Icaza  <[email protected]>

	* Path.cs (GetDirectoryName): Fix for filenames with size = 1

	* File.cs: Removed all references that threw exceptions when the
	paths contains a colon, as this is a valid part of an identifier
	on Unix.

	Everywhere: The String.Empty return from GetDirectoryName means
	that there is no directory information about the path.

svn path=/trunk/mcs/; revision=6868
2002-08-21 23:38:23 +00:00
Gonzalo Paniagua Javier 8830ff436a 2002-07-28 Gonzalo Paniagua Javier <[email protected]>
* File.cs:
	(Create): allow file names without path.

svn path=/trunk/mcs/; revision=6221
2002-07-28 05:19:09 +00:00
Dietmar Maurer 28fb0468eb 2002-06-17 Dietmar Maurer <[email protected]>
* MonoType.cs: GetField is now a InternalCall

	* File.cs (Delete): only call Directory.Exists() if DirName != ""

svn path=/trunk/mcs/; revision=5301
2002-06-17 10:13:49 +00:00
Nick Drochak 5374cbe27d 2002-05-14 Nick Drochak <[email protected]>
* File.cs: Add parameter checks to most methods. Not completely done,
	but all current unit tests pass.

	* Path.cs: Implement GetTempFileName().

svn path=/trunk/mcs/; revision=4621
2002-05-14 10:40:23 +00:00
Nick Drochak 10a3af7b9e 2002-05-09 Nick Drochak <[email protected]>
* File.cs (Delete): Do not throw an exception if the file does not
	exist.

svn path=/trunk/mcs/; revision=4413
2002-05-08 11:45:42 +00:00
Mike Gray f479b60806 2002-05-08 Mike Gray <[email protected]>
* File.cs: According to ECMA spec and MS docs Copy(src, dest)
        should not overwrite dest by default.

svn path=/trunk/mcs/; revision=4407
2002-05-08 08:12:55 +00:00
Miguel de Icaza 1aaef71410 2002-05-07 Mike Gray <[email protected]>
* File.cs: Implemented CreateText method, and fixed dst compares
	to compare against "" instead of null twice.

svn path=/trunk/mcs/; revision=4355
2002-05-07 01:39:48 +00:00
Piers Haken cc63806f23 minor CLS conformance tweaks (visibility, virtual, abstract, sealed, etc...)
svn path=/trunk/mcs/; revision=3568
2002-04-03 06:28:53 +00:00
Piers Haken 84187bf9a6 fixed member accessibility to match MS (corcompare).
svn path=/trunk/mcs/; revision=3531
2002-04-01 06:07:43 +00:00
Dan Lewis d6e7b06471 2002-03-27 Dan Lewis <[email protected]>
corlib/

	* corlib.build: removed seperate windows/linux builds. excluded
	wrapper and PAL classes from all builds.

corlib/System/

	* Console.cs: Modified to get std handles from MonoIO.
	* Environment.cs: removed PAL dependencies.

corlib/System.IO/

	* Directory.cs, File.cs, FileSystemInfo.cs, FileInfo.cs,
	DirectoryInfo.cs, Path.cs: Modified to use MonoIO class instead of
	wrapper and PAL classes.

	* MonoIO.cs, MonoIOStat.cs, MonoIOError.cs: Added.

svn path=/trunk/mcs/; revision=3379
2002-03-27 00:51:39 +00:00
Miguel de Icaza 99a1e34e98 2002-01-23 Miguel de Icaza <[email protected]>
* Unix/Errno.cs: Added

	* Unix/Wrapper.cs: Updated to new Wrapper

2002-01-23  Miguel de Icaza  <[email protected]>

	* FileInfo.c (CopyTo, MoveTo): Implement.

	* FileStream.cs: Add argument checking to the constructor.

	* File.cs: Rewrote most of the file.  Implement Copy, Open, Create,
	OpenText, OpenWrite, Move.  Made pending methods flagged as MonoTODO.

	* Directory.cs (Delete): reimplement without using DirectoryInfo.
	(Delete): Implement the recursive version.
	(GetCreationTime, GetLastWriteTime, GetLastAccessTime): Implement.
	(Move): Reimplement.
	(getNames): dead code removal.

	* Path.cs: define an internal DirectorySeparatorStr that we use in
	a few spots.

	* Wrapper.cs: Updated to new version.

	* DirectoryInfo (Delete): Implement using the Directory API.

2002-01-23  Miguel de Icaza  <[email protected]>

	* DateTime.cs (UnixEpoch): The Begining of the Unix epoch.

svn path=/trunk/mcs/; revision=2138
2002-01-24 00:59:13 +00:00
Ravi Pratap M de8d750995 2002-01-04 Ravi Pratap <[email protected]>
* CheckArgument.cs, CheckPermission.cs, Directory.cs: MonoTODO
	attribute decorations.

	* DirectoryInfo.cs, File.cs, FileInfo.cs, FileSystemInfo.cs,
	Path.cs, TextReader.cs, TextWriter.cs : Ditto.

	* FileLoadException.cs, FileNotFoundException.cs, StreamReader.cs:
	Ditto.

svn path=/trunk/mcs/; revision=1832
2002-01-04 15:46:38 +00:00
Sean MacIsaac 6d11b05caa Removing old build files. NAnt doesn't use them.
svn path=/trunk/mcs/; revision=969
2001-09-26 09:11:29 +00:00
Paolo Molaro d470ebd256 Tue Sep 25 18:52:14 CEST 2001 Paolo Molaro <[email protected]>
* Type.cs: added GetType () method.


Tue Sep 25 18:52:48 CEST 2001 Paolo Molaro <[email protected]>

	* ArrayList.cs: fix Insert () to check capacity, not count.


Tue Sep 25 18:54:06 CEST 2001 Paolo Molaro <[email protected]>

	* File.cs: fix signatures of the Open() and OpenRead() functions
	(they are static).

svn path=/trunk/mcs/; revision=958
2001-09-25 12:58:06 +00:00
Jim Richardson d8fc82a8da I suppose it helps when using CodeWright with C# to look at the output
for errors because the status line that says No Errors found "lies"
Fixed the compiler errors and vow to be more careful with copy/paste

svn path=/trunk/mcs/; revision=583
2001-08-23 01:16:08 +00:00