Commit Graph
82 Commits
Author SHA1 Message Date
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 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
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 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
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
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
Miguel de Icaza 0c4de17e04 Revert this part: empty strings are valid names in Unix
svn path=/trunk/mcs/; revision=72767
2007-02-13 13:00:31 +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
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
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 8e98d66d5f CorCompare work
svn path=/trunk/mcs/; revision=69918
2006-12-22 00:53:15 +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
Dick Porter 6effe4dc99 2006-11-03 Jensen Somers <[email protected]>
* Directory.cs: CreateDirectory() should throw IOException if a
        file or directory with the same name already exists, in the 2.0
        profile.  Fixes bug 79806.



svn path=/trunk/mcs/; revision=67410
2006-11-06 16:45:44 +00:00
Dick Porter 3145b5da9e 2006-07-06 Dick Porter <[email protected]>
* Directory.cs: When creating a directory treat ERROR_FILE_EXISTS
        (ie a file already exists with that name) the same as
        ERROR_ALREADY_EXISTS (ie a directory already exists with that
        name.)  Keeps bug 50753 fixed when I fix the io-layer
        CreateDirectory() behaviour.

2006-07-06  Dick Porter  <[email protected]>

        * DirectoryTest.cs: Test creating a directory when a file or
        directory already exists with the requested name.



svn path=/trunk/mcs/; revision=62318
2006-07-06 15:24:45 +00:00
Atsushi Eno 6551e21832 2006-06-21 Atsushi Enomoto <[email protected]>
* Directory.cs : implemented GetFiles() and GetDirectories() which
	  takes SearchOption (as they are used in one of ruby.net stuff).


svn path=/trunk/mcs/; revision=61890
2006-06-21 07:17:53 +00:00
Miguel de Icaza b604b17ff0 2006-05-18 Miguel de Icaza <[email protected]>
* Directory.cs (Exists): Ignore INVALID_HANDlE, return false.

svn path=/trunk/mcs/; revision=61446
2006-06-05 00:52:33 +00:00
Daniel Drake 850045d285 2006-05-01 Daniel Drake <[email protected]>
* Directory.cs: Return false (as documented) on ERROR_ACCESS_DENIED in
	Exists() rather than throwing an exception. Bug #78239.

svn path=/trunk/mcs/; revision=60119
2006-05-01 14:40:26 +00:00
Gonzalo Paniagua Javier 52e8c77bae 2006-04-28 Gonzalo Paniagua Javier <[email protected]>
* Directory.cs: make sure the parent directory is not an empty string
	when a file name with no path is provided. Fixes bug #78209. Patch by
	Emery Conrad.


svn path=/trunk/mcs/; revision=60054
2006-04-28 20:01:35 +00:00
Zoltan Varga 000cf8d2a8 2005-12-07 Zoltan Varga <[email protected]>
* Directory.cs: Fix a warning.

svn path=/trunk/mcs/; revision=54040
2005-12-07 14:16:43 +00:00
Zoltan Varga 0ea1d8a916 2005-11-06 Zoltan Varga <[email protected]>
* Directory.cs: Add stub for net 2.0 GetFiles method.

svn path=/trunk/mcs/; revision=52635
2005-11-06 21:30:57 +00:00
Gonzalo Paniagua Javier 07caf875a3 2005-10-04 Gonzalo Paniagua Javier <[email protected]>
* MonoIO.cs: replace FindFirst/FindNext/FindClose with
	GetFileSystemEntries.
	* Directory.cs: simplify GetFileSystemEntries by using the new icall.


svn path=/trunk/mcs/; revision=51152
2005-10-04 08:20:51 +00:00
Gonzalo Paniagua Javier 6734f26980 2005-07-24 Gonzalo Paniagua Javier <[email protected]>
* Directory.cs: don't leak 'find' handles.


svn path=/trunk/mcs/; revision=47618
2005-07-24 20:38:16 +00:00
Gonzalo Paniagua Javier e09bd3fe52 2005-05-06 Gonzalo Paniagua Javier <[email protected]>
* Directory.cs: if the pattern is just a file name and it exists, return
	it right away. Fixes bug #72143.


svn path=/trunk/mcs/; revision=44180
2005-05-07 00:09:11 +00:00
Sebastien Pouliot c9c4705f66 2005-03-24 Sebastien Pouliot <[email protected]>
* 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
2005-03-24 14:12:01 +00:00
Sebastien Pouliot bb97d39d6a 2005-01-24 Sebastien Pouliot <[email protected]>
* Directory.cs: Added CAS security to Get|SetCurrentDirectory to 
	complete Environment security checks.


svn path=/trunk/mcs/; revision=39499
2005-01-25 13:50:30 +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
Gonzalo Paniagua Javier 809c3d5843 2004-06-24 Gonzalo Paniagua Javier <[email protected]>
* Directory.cs: implemented GetLogicalDrives.

svn path=/trunk/mcs/; revision=30300
2004-06-24 13:14:24 +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 1e68e05910 (IsRootDirectory): New helper method for determining if a path is the
root directory. Handles both Unix as well as Windows.
(GetParent): Use IsRootDirectory for the check.

svn path=/trunk/mcs/; revision=29065
2004-06-08 21:29:57 +00:00
Duncan Mak 6fd29319dd Fix embarrassment
svn path=/trunk/mcs/; revision=29063
2004-06-08 20:45:34 +00:00
Duncan Mak ea24ee3d3e Make it work on Windows as well
svn path=/trunk/mcs/; revision=29062
2004-06-08 20:28:52 +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
Gonzalo Paniagua Javier 8dd5b7a64b no more IsEmptyString
svn path=/trunk/mcs/; revision=28006
2004-05-24 21:49:55 +00:00
Gonzalo Paniagua Javier a7402c9747 2004-05-25 Gonzalo Paniagua Javier <[email protected]>
* Directory.cs: ERROR_FILE_NOT_FOUND in FindFirstFile means there are
	no files, but the directory was found. Fixes bug #58875.

svn path=/trunk/mcs/; revision=28005
2004-05-24 21:36:27 +00:00
Duncan Mak 6ecda639c2 Remove debug messages
svn path=/trunk/mcs/; revision=27991
2004-05-24 19:17:23 +00:00
Duncan Mak 263c2985a7 2004-05-22 Duncan Mak <[email protected]>
* Directory.cs: Reformat the whole file to use Unix line endings
	for consistency.
	(GetFileSystemEntries): If pattern is String.Empty, always
	return an empty string array. Throw the ArgumentException if path
	is an empty string (determined using the new helper method)
	(IsEmptyString): Returns true on an empty string or a string with
	only whitespace characters.

	* Path.cs (GetPathRoot): Throw an ArgumentException if the path
	argument is String.Empty.

svn path=/trunk/mcs/; revision=27990
2004-05-24 18:45:35 +00:00
Duncan Mak cd424ecf02 Reformat the whole file to use Unix line endings for consistency.
svn path=/trunk/mcs/; revision=27907
2004-05-22 21:42:10 +00:00
Gonzalo Paniagua Javier ffbd7f9d99 2004-05-06 Gonzalo Paniagua Javier <[email protected]>
* Directory.cs: use the real wildcard for file names as it is supported
	now in io-layer. SearhPattern is not needed now.

svn path=/trunk/mcs/; revision=26856
2004-05-06 17:48:31 +00:00
Gonzalo Paniagua Javier ec4c6c8190 2004-03-04 Gonzalo Paniagua Javier <[email protected]>
* Directory.cs: check if the error returned in Exists is different
	from 'path not found' and throw the appropiate exception in that case.
	See #55160.

svn path=/trunk/mcs/; revision=23701
2004-03-04 19:57:23 +00:00
Atsushi Eno e39ed8312d 2003-12-17 Atsushi Enomoto <[email protected]>
* Directory.cs : SetCurrentDirectory() should raise errors for
          some kind of arguments.

svn path=/trunk/mcs/; revision=21272
2003-12-17 11:45:48 +00:00
Gonzalo Paniagua Javier 4739b4b82b Updated LAMESPEC
svn path=/trunk/mcs/; revision=20423
2003-11-25 10:50:06 +00:00
Gonzalo Paniagua Javier 2be737caf8 2003-11-24 Gonzalo Paniagua Javier <[email protected]>
* Directory.cs: provide the path when getting the IOException.

svn path=/trunk/mcs/; revision=20402
2003-11-24 20:37:42 +00:00
Gonzalo Paniagua Javier 5fd271c08b 2003-11-15 Gonzalo Paniagua Javier <[email protected]>
* System/Environment.cs: use Directory in CurrentDirectory property.
	We were not throwing any exception when setting the directory to an
	invalid path.

	* System.IO/Directory.cs:
	(GetCurrentDirectory):
	(SetCurrentDirectory): moved here from Environment. Handle error cases.

	* System.IO/MonoIO.cs: add path to the default error message.

svn path=/trunk/mcs/; revision=20032
2003-11-15 13:13:45 +00:00
Gonzalo Paniagua Javier 8472d11bb4 2003-11-14 Gonzalo Paniagua Javier <[email protected]>
* Directory.cs: allow directory names without wildcards in the pattern.
	Fixes bug #3 50969.

	* SearchPattern.cs: made InvalidChars and WildcardChars internal.

svn path=/trunk/mcs/; revision=19990
2003-11-14 06:14:33 +00:00