2002-01-04 Ravi Pratap <ravi@ximian.com>
authorRavi Pratap M <ravi@mono-cvs.ximian.com>
Fri, 4 Jan 2002 15:46:38 +0000 (15:46 -0000)
committerRavi Pratap M <ravi@mono-cvs.ximian.com>
Fri, 4 Jan 2002 15:46:38 +0000 (15:46 -0000)
* 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

14 files changed:
mcs/class/corlib/System.IO/ChangeLog
mcs/class/corlib/System.IO/CheckArgument.cs
mcs/class/corlib/System.IO/CheckPermission.cs
mcs/class/corlib/System.IO/Directory.cs
mcs/class/corlib/System.IO/DirectoryInfo.cs
mcs/class/corlib/System.IO/File.cs
mcs/class/corlib/System.IO/FileInfo.cs
mcs/class/corlib/System.IO/FileLoadException.cs
mcs/class/corlib/System.IO/FileNotFoundException.cs
mcs/class/corlib/System.IO/FileSystemInfo.cs
mcs/class/corlib/System.IO/Path.cs
mcs/class/corlib/System.IO/StreamReader.cs
mcs/class/corlib/System.IO/TextReader.cs
mcs/class/corlib/System.IO/TextWriter.cs

index 0e46239e6173722ee82ae19696815c446c95b9f1..f81082e96544fa9782c8d65aaca3bf2b1f5d3c2b 100644 (file)
@@ -1,3 +1,14 @@
+2002-01-04  Ravi Pratap  <ravi@ximian.com>
+
+       * 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.
+
 2001-12-11  Dick Porter  <dick@ximian.com>
 
        * FileStream.cs: Use handles rather than casting file descriptors.
index b7d4e26d88ed8ba59b4d318f800b3dc31258b59e..7b3316eceaf2c5e2fc248bfff6117ca3a9632e51 100644 (file)
@@ -112,6 +112,7 @@ namespace System.IO
                /// <summary>
                /// Generates and exception if path too long
                /// </summary>
+               [MonoTODO]
                public static void PathLength(string path, string desc)
                {
                        //TODO: find out how long is too long
index a18ee836dae5e821e7293137515a9131267e6723..a5462eed3529718233d7de6127b623542565e10d 100644 (file)
@@ -26,6 +26,7 @@ namespace System.IO
                /// <summary>
                /// Generates and exception if caller doesn't have flags access to filesystem item specified by path
                /// </summary>
+               [MonoTODO]
                public static void Demand(FileIOPermissionAccess flags, string path)
                {
                        FileIOPermission ioPerm = new FileIOPermission(flags, path);
@@ -51,7 +52,8 @@ namespace System.IO
                                throw new ArgumentException("Invalid FileAccess parameter");
                        }
                }
-               
+
+               [MonoTODO]
                public static void ModeAccess(FileMode mode, FileAccess access, string path, bool exists)
                {
                        return;
index 407237379803eb89ffbcd773c47aa5390fbbc134..f547fcf7e292038288cfb801cd77cf0d0c8d3a6a 100644 (file)
@@ -6,16 +6,16 @@
 // \r
 // Author:         Jim Richardson, develop@wtfo-guru.com\r
 // Created:        Monday, August 13, 2001 \r
-//
+//\r
 // TODO: Research exceptions for all methods\r
 //------------------------------------------------------------------------------\r
 \r
-using System;
+using System;\r
 using System.Security.Permissions;\r
 \r
 namespace System.IO\r
-{
-
+{\r
+\r
 \r
        /// <summary>\r
        /// \r
@@ -27,66 +27,66 @@ namespace System.IO
                /// Creates all directories not existing in path\r
                /// </summary>\r
                public static DirectoryInfo CreateDirectory(string path)\r
-               {       
-                       DirectoryInfo dInfo = getInfo(path);
-                       if(!dInfo.Exists)
-                       {
-                               dInfo.Create();
-                       }
-                       return dInfo;
-               }
+               {       \r
+                       DirectoryInfo dInfo = getInfo(path);\r
+                       if(!dInfo.Exists)\r
+                       {\r
+                               dInfo.Create();\r
+                       }\r
+                       return dInfo;\r
+               }\r
                \r
                /// <summary>\r
                /// Delete an empty directory\r
                /// </summary>\r
                public static void Delete(string path)\r
-               {       
-                       DirectoryInfo dInfo = getInfo(path);
-                       if(dInfo.Exists)
-                       {
-                               dInfo.Delete();
+               {       \r
+                       DirectoryInfo dInfo = getInfo(path);\r
+                       if(dInfo.Exists)\r
+                       {\r
+                               dInfo.Delete();\r
                        }\r
-               }
+               }\r
                \r
                /// <summary>\r
                /// Delete a directory, and contents if bRecurse is true\r
                /// </summary>\r
                public static void Delete(string path, bool bRecurse)\r
-               {       
-                       DirectoryInfo dInfo = getInfo(path);
-                       if(dInfo.Exists)
-                       {
-                               dInfo.Delete(bRecurse);
+               {       \r
+                       DirectoryInfo dInfo = getInfo(path);\r
+                       if(dInfo.Exists)\r
+                       {\r
+                               dInfo.Delete(bRecurse);\r
                        }\r
-               }
+               }\r
                \r
                /// <summary>\r
                /// Returns true if directory exists on disk\r
                /// </summary>\r
-               public static bool Exists(string path)
+               public static bool Exists(string path)\r
                {\r
                        return getInfo(path).Exists;\r
-               }
+               }\r
                \r
                /// <summary>\r
                /// Returns the date and time the directory specified by path was created\r
                /// </summary>\r
                public static DateTime GetCreationTime(string path)\r
-               {
+               {\r
                        return getInfo(path).CreationTime;\r
-               }
+               }\r
                \r
                /// <summary>\r
                /// Returns the date and time the directory specified by path was created\r
-               /// </summary>
+               /// </summary>\r
                public static string GetCurrentDirectory()\r
-               {       // Implementation complete 08/25/2001 14:24 except for
-                       // LAMESPEC: documentation specifies invalid exceptions (i think)
+               {       // Implementation complete 08/25/2001 14:24 except for\r
+                       // LAMESPEC: documentation specifies invalid exceptions (i think)\r
                        //           also shouldn't need Write to getcurrrent should we?\r
-                       string str = Environment.CurrentDirectory;
-                       CheckPermission.Demand(FileIOPermissionAccess.Read & FileIOPermissionAccess.Write, str);
+                       string str = Environment.CurrentDirectory;\r
+                       CheckPermission.Demand(FileIOPermissionAccess.Read & FileIOPermissionAccess.Write, str);\r
                        return str;     \r
-               }
+               }\r
                \r
                /// <summary>\r
                /// Returns an array of directories in the directory specified by path\r
@@ -94,16 +94,16 @@ namespace System.IO
                public static string[] GetDirectories(string path)\r
                {\r
                        return getNames(getInfo(path).GetDirectories());\r
-               }
+               }\r
                \r
                /// <summary>\r
                /// Returns an array of directories in the directory specified by path\r
                /// matching the filter specified by mask\r
                /// </summary>\r
                public static string[] GetDirectories(string path, string mask)\r
-               {
+               {\r
                        return getNames(DirectoryInfo.GetDirectories(mask));\r
-               }
+               }\r
                \r
                /// <summary>\r
                /// Returns the root of the specified path\r
@@ -111,59 +111,62 @@ namespace System.IO
                public static string GetDirectoryRoot(string path)\r
                {\r
                        return getInfo(path).Root.FullName;\r
-               }
+               }\r
                \r
                /// <summary>\r
                /// Returns an array of files in the directory specified by path\r
                /// </summary>\r
                public static string[] GetFiles(string path)\r
-               {
+               {\r
                        return getNames(getInfo(path).GetFiles());\r
-               }
+               }\r
                \r
                /// <summary>\r
                /// Returns an array of files in the directory specified by path\r
                /// matching the filter specified by mask\r
                /// </summary>\r
                public static string[] GetFiles(string path, string mask)\r
-               {
+               {\r
                        return getNames(getInfo(path).GetFiles());\r
                }\r
                /// <summary>\r
-               /// Returns an array of filesystementries in the directory specified by path
+               /// Returns an array of filesystementries in the directory specified by path\r
                /// I think this is just files and directories\r
                /// </summary>\r
+               [MonoTODO]\r
                public static string[] GetFileSystemEntries(string path)\r
-               {       // TODO: Research to verify this is files + directories
+               {       // TODO: Research to verify this is files + directories\r
                        return getNames(getInfo(path).GetFileSystemInfos());\r
                }\r
                /// <summary>\r
                /// Returns an array of filesystementries in the directory specified by path\r
                /// matching the filter specified by mask\r
                /// </summary>\r
-               public static string[] GetFileSystemEntries(string path, string mask)
-               {       // TODO: Research to verify this is files + directories
-                       return getNames(getInfo(path).GetFileSystemInfos());            }
+               [MonoTODO]\r
+               public static string[] GetFileSystemEntries(string path, string mask)\r
+               {       // TODO: Research to verify this is files + directories\r
+                       return getNames(getInfo(path).GetFileSystemInfos());            }\r
                \r
                /// <summary>\r
                /// Returns the date and time the directory specified by path was last accessed\r
                /// </summary>\r
                public static DateTime GetLastAccessTime(string path)\r
-               {
+               {\r
                        return getInfo(path).LastAccessTime;\r
-               }
+               }\r
                \r
                /// <summary>\r
                /// Returns the date and time the directory specified by path was last modified\r
                /// </summary>\r
                public static DateTime GetLastWriteTime(string path)\r
-               {
+               {\r
                        return getInfo(path).LastWriteTime;\r
-               }
+               }\r
                \r
                /// <summary>\r
                /// Returns an array of logical drives on this system\r
                /// </summary>\r
+               [MonoTODO]\r
                public static string[] GetLogicalDrives()\r
                {       // TODO: Implement\r
                        return null;\r
@@ -171,6 +174,7 @@ namespace System.IO
                /// <summary>\r
                /// Returns the parent directory of the directory specified by path\r
                /// </summary>\r
+               [MonoTODO]\r
                public static DirectoryInfo GetParent(string path)\r
                {       // TODO: Implement\r
                        return null;\r
@@ -179,64 +183,64 @@ namespace System.IO
                /// Moves a directory and its contents\r
                /// </summary>\r
                public static void Move(string src, string dst)\r
-               {
+               {\r
                         getInfo(src).MoveTo(dst);\r
-               }
+               }\r
                \r
                /// <summary>\r
                /// Sets the creation time of the directory specified by path\r
                /// </summary>\r
                public static void SetCreationTime(string path, DateTime creationTime)\r
-               {
+               {\r
                        getInfo(path).CreationTime = creationTime;\r
-               }
+               }\r
                \r
                /// <summary>\r
                /// Sets the current directory to the directory specified by path\r
                /// </summary>\r
                public static void SetCurrentDirectory(string path)\r
-               {       // Implementation complete 08/25/2001 14:24 except for
-                       // LAMESPEC: documentation specifies invalid exceptions IOException (i think)
-                       CheckArgument.Path(path, true);
-                       CheckPermission.Demand(FileIOPermissionAccess.Read & FileIOPermissionAccess.Write, path);       
-                       if(!Exists(path))
-                       {
-                               throw new DirectoryNotFoundException("Directory \"" + path + "\" not found.");
-                       }
+               {       // Implementation complete 08/25/2001 14:24 except for\r
+                       // LAMESPEC: documentation specifies invalid exceptions IOException (i think)\r
+                       CheckArgument.Path(path, true);\r
+                       CheckPermission.Demand(FileIOPermissionAccess.Read & FileIOPermissionAccess.Write, path);       \r
+                       if(!Exists(path))\r
+                       {\r
+                               throw new DirectoryNotFoundException("Directory \"" + path + "\" not found.");\r
+                       }\r
                        Environment.CurrentDirectory = path;\r
-               }
+               }\r
                \r
                /// <summary>\r
                /// Sets the last access time of the directory specified by path\r
                /// </summary>\r
                public static void SetLastAccessTime(string path, DateTime accessTime)\r
-               {
+               {\r
                        getInfo(path).LastAccessTime = accessTime;\r
-               }
+               }\r
                \r
                /// <summary>\r
                /// Sets the last write time of the directory specified by path\r
                /// </summary>\r
                public static void SetLastWriteTime(string path, DateTime modifiedTime)\r
-               {
+               {\r
                        getInfo(path).LastWriteTime = modifiedTime;\r
-               }
-               
-               private static DirectoryInfo getInfo(string path)
-               {
-                       return new DirectoryInfo(path);
-               }
-               
-               private static string[] getNames(FileSystemInfo[] arInfo)
-               {
-                       int index = 0;
-                       string[] ar = new string[arInfo.Length];
-                                               
-                       foreach(FileInfo fi in arInfo)
-                       {
-                               ar[index++] = fi.FullName;
-                       }
-                       return ar;
-               }
+               }\r
+               \r
+               private static DirectoryInfo getInfo(string path)\r
+               {\r
+                       return new DirectoryInfo(path);\r
+               }\r
+               \r
+               private static string[] getNames(FileSystemInfo[] arInfo)\r
+               {\r
+                       int index = 0;\r
+                       string[] ar = new string[arInfo.Length];\r
+                                               \r
+                       foreach(FileInfo fi in arInfo)\r
+                       {\r
+                               ar[index++] = fi.FullName;\r
+                       }\r
+                       return ar;\r
+               }\r
        }\r
 }\r
index 934f06166f27ae4ff02a0f566d1bbddbfd26f3ab..512f096283d156c23cef2fd2f1ca1343d9fea0dd 100644 (file)
@@ -9,7 +9,7 @@
 //\r
 //------------------------------------------------------------------------------\r
 \r
-using System;
+using System;\r
 using System.Diagnostics;\r
 \r
 namespace System.IO\r
@@ -23,31 +23,32 @@ namespace System.IO
                public DirectoryInfo(string path)\r
                {\r
                        CheckArgument.Path(path, false);\r
-                       //LAMESPEC: Does not throw directory not found exception
-                       //          Does not throw security exception in constructor
-                       OriginalPath = path;    
+                       //LAMESPEC: Does not throw directory not found exception\r
+                       //          Does not throw security exception in constructor\r
+                       OriginalPath = path;    \r
                }\r
 \r
                public override bool Exists\r
                {\r
                        get\r
-                       {
-                               bool bRetCode;
-                               
-                               try
-                               {
-                                       Refresh();
-                                       bRetCode = ((Attributes & FileAttributes.Directory) != 0);
-                               }
-                               catch(ArgumentException ex)                             
-                               {
-                                       Debug.WriteLine(ex); // eliminates not used warning
-                                       bRetCode = false;
-                               }
+                       {\r
+                               bool bRetCode;\r
+                               \r
+                               try\r
+                               {\r
+                                       Refresh();\r
+                                       bRetCode = ((Attributes & FileAttributes.Directory) != 0);\r
+                               }\r
+                               catch(ArgumentException ex)                             \r
+                               {\r
+                                       Debug.WriteLine(ex); // eliminates not used warning\r
+                                       bRetCode = false;\r
+                               }\r
                                return bRetCode;\r
                        }\r
                }\r
 \r
+               [MonoTODO]\r
                public override string Name\r
                {\r
                        get\r
@@ -56,6 +57,7 @@ namespace System.IO
                        }\r
                }\r
 \r
+               [MonoTODO]\r
                public DirectoryInfo Root\r
                {\r
                        get\r
@@ -64,11 +66,13 @@ namespace System.IO
                        }\r
                }\r
 \r
+               [MonoTODO]\r
                public void Create()\r
                {\r
                        //TODO: Implement\r
                }\r
 \r
+               [MonoTODO]\r
                DirectoryInfo CreateSubdirectory(string path)\r
                {\r
                        return null;    //TODO: Implement\r
@@ -87,6 +91,7 @@ namespace System.IO
                /// <summary>\r
                /// Returns an array of DirectoryInfos for subdirectories\r
                /// </summary>\r
+               [MonoTODO]\r
                public DirectoryInfo[] GetDirectories()\r
                {\r
                        return null;    //TODO: Implement\r
@@ -95,6 +100,7 @@ namespace System.IO
                /// Returns an array of DirectoryInfos\r
                /// matching the filter specified by mask\r
                /// </summary>\r
+               [MonoTODO]\r
                public static DirectoryInfo[] GetDirectories(string mask)\r
                {\r
                        return null;    //TODO: Implement\r
@@ -110,6 +116,7 @@ namespace System.IO
                /// Returns an array of FileInfo\r
                /// matching the filter specified by mask\r
                /// </summary>\r
+               [MonoTODO]\r
                public static FileInfo[] GetFiles(string mask)\r
                {\r
                        return null;    //TODO: Implement\r
@@ -117,6 +124,7 @@ namespace System.IO
                /// <summary>\r
                /// Returns an array of FileSystemInfo for subdirectories\r
                /// </summary>\r
+               [MonoTODO]\r
                public FileSystemInfo[] GetFileSystemInfos()\r
                {\r
                        return null;    //TODO: Implement\r
@@ -125,6 +133,7 @@ namespace System.IO
                /// Returns an array of FileSystemInfo\r
                /// matching the filter specified by mask\r
                /// </summary>\r
+               [MonoTODO]\r
                public static FileSystemInfo[] GetFileSystemInfos(string mask)\r
                {\r
                        return null;    //TODO: Implement\r
index 78a01267d9cdb5eb9ce4adf189a37aa921f1e17e..ac806bffd92957c9f66b603353ddb8932b3cb769 100644 (file)
@@ -6,7 +6,7 @@
 // \r
 // Author:         Jim Richardson, develop@wtfo-guru.com\r
 // Created:        Monday, August 22, 2001 \r
-//
+//\r
 // TODO: Research exceptions for all methods\r
 //------------------------------------------------------------------------------\r
 \r
@@ -18,67 +18,73 @@ namespace System.IO
        /// \r
        /// </summary>\r
        public sealed class File : Object\r
-       { 
-               /// <summary>
-               /// Creates a StreamWriter that appends text to a file creating the file if needed
-               /// </summary>
-               public static StreamWriter AppendText(string path)
-               {       // TODO: Implement
-                       return null;
-               }
-                
-               /// <summary>
-               /// Copies a file overwriting existing if necessary
-               /// </summary>
-               public static void Copy(string sourceFilename, string destFilename)
-               {
-                       Copy(sourceFilename, destFilename, true);
-               }
-                
-               /// <summary>
-               /// Copies a file overwriting existing if specified
-               /// </summary>
-               public static void Copy(string sourceFilename, string destFilename, bool bOverwrite)
-               {       // TODO: Implement
-               }
+       { \r
+               /// <summary>\r
+               /// Creates a StreamWriter that appends text to a file creating the file if needed\r
+               /// </summary>\r
+               [MonoTODO]\r
+               public static StreamWriter AppendText(string path)\r
+               {       // TODO: Implement\r
+                       return null;\r
+               }\r
+                \r
+               /// <summary>\r
+               /// Copies a file overwriting existing if necessary\r
+               /// </summary>\r
+               public static void Copy(string sourceFilename, string destFilename)\r
+               {\r
+                       Copy(sourceFilename, destFilename, true);\r
+               }\r
+                \r
+               /// <summary>\r
+               /// Copies a file overwriting existing if specified\r
+               /// </summary>\r
+               [MonoTODO]\r
+               public static void Copy(string sourceFilename, string destFilename, bool bOverwrite)\r
+               {       // TODO: Implement\r
+               }\r
 \r
                /// <summary>\r
                /// Creates a file given the fully qualified path\r
                /// </summary>\r
+               [MonoTODO]\r
                public static FileStream Create(string path)\r
                {       // TODO: Research default buffersize\r
                        return Create(path, 1024);\r
-               }
-
-               /// <summary>
-               /// Creates a file given the fully qualified path using specified buffersize
-               /// </summary>
-               public static FileStream Create(string path, int buffersize)
-               {       // TODO: Implement
-                       return null;
-               }
+               }\r
+\r
+               /// <summary>\r
+               /// Creates a file given the fully qualified path using specified buffersize\r
+               /// </summary>\r
+               [MonoTODO]\r
+               public static FileStream Create(string path, int buffersize)\r
+               {       // TODO: Implement\r
+                       return null;\r
+               }\r
                \r
                /// <summary>\r
                /// Delete a file\r
                /// </summary>\r
+               [MonoTODO]\r
                public static void Delete(string path)\r
                {       // TODO: Implement\r
-               }
-               
+               }\r
+               \r
                /// <summary>\r
                /// Returns true if file exists on disk\r
                /// </summary>\r
+               [MonoTODO]\r
                public static bool Exists(string path)\r
                {       // TODO: Implement\r
                        return false;\r
-               }
+               }\r
                \r
                /// <summary>\r
                /// Returns the date and time the file specified by path was created\r
                /// </summary>\r
                public static FileAttributes GetAttributes(string path)\r
                {\r
-                       FileInfo fInfo = new FileInfo(path);
+                       FileInfo fInfo = new FileInfo(path);\r
                        return fInfo.Attributes;\r
                }\r
 \r
@@ -86,18 +92,18 @@ namespace System.IO
                /// Returns the date and time the directory specified by path was created\r
                /// </summary>\r
                public static DateTime GetCreationTime(string path)\r
-               {
+               {\r
                        return getInfo(path).CreationTime;\r
                }\r
-
+\r
                /// <summary>\r
                /// Returns the date and time the directory specified by path was last accessed\r
                /// </summary>\r
                public static DateTime GetLastAccessTime(string path)\r
-               {
+               {\r
                        return getInfo(path).LastAccessTime;\r
                }\r
-
+\r
                /// <summary>\r
                /// Returns the date and time the directory specified by path was last modified\r
                /// </summary>\r
@@ -110,71 +116,74 @@ namespace System.IO
                /// Moves a file\r
                /// </summary>\r
                public static void Move(string srcFilename, string destFilename)\r
-               {
-                       getInfo(srcFilename).MoveTo(destFilename);
-               }
-               
-               /// <summary>
-               /// Open a file for exclusive reading and writing
-               /// </summary>
-               public static FileStream Open(string path, FileMode mode)
-               {       // TODO: research if exclusive is the correct default
-                       return getInfo(path).Open(mode, FileAccess.ReadWrite);
-               }
-               
-               /// <summary>
-               /// Open a file for exclusive access specified by mode
-               /// </summary>
-               public static FileStream Open(string path, FileMode mode, FileAccess access)
-               {       // TODO: research if exclusive is the correct default
-                       return getInfo(path).Open(mode, access, FileShare.None);
-               }
-               
-               /// <summary>
-               /// Open a file access specified by mode, sharing specified by share
-               /// </summary>
-               public static FileStream Open(string path, FileMode mode, FileAccess access, FileShare share)
-               {
-                       return getInfo(path).Open(mode, access, share);
-               }
-               
-               /// <summary>
-               /// Open a FileStream for reading and writing
-               /// </summary>
-               public static FileStream OpenRead(string path)
-               {       // TODO: find out what default share should be
-                       return getInfo(path).OpenRead();
-               }
-               
-               /// <summary>
-               /// Open a StreamReader
-               /// </summary>
-               public static StreamReader OpenText(string path)
-               {
-                       return getInfo(path).OpenText();
-               }
-
-               /// <summary>
-               /// Open a FileStream for reading and writing
-               /// </summary>
-               public FileStream OpenWrite(string path)
-               {
-                       return getInfo(path).OpenWrite();
-               }
-               
-               /// <summary>
-               /// Sets the attributes of file specified by path
-               /// </summary>
-               public static void SetAttributes(string path, FileAttributes attributes)
-               {
-                       getInfo(path).Attributes = attributes;
-               }
+               {\r
+                       getInfo(srcFilename).MoveTo(destFilename);\r
+               }\r
+               \r
+               /// <summary>\r
+               /// Open a file for exclusive reading and writing\r
+               /// </summary>\r
+               [MonoTODO]\r
+               public static FileStream Open(string path, FileMode mode)\r
+               {       // TODO: research if exclusive is the correct default\r
+                       return getInfo(path).Open(mode, FileAccess.ReadWrite);\r
+               }\r
+               \r
+               /// <summary>\r
+               /// Open a file for exclusive access specified by mode\r
+               /// </summary>\r
+               [MonoTODO]\r
+               public static FileStream Open(string path, FileMode mode, FileAccess access)\r
+               {       // TODO: research if exclusive is the correct default\r
+                       return getInfo(path).Open(mode, access, FileShare.None);\r
+               }\r
+               \r
+               /// <summary>\r
+               /// Open a file access specified by mode, sharing specified by share\r
+               /// </summary>\r
+               public static FileStream Open(string path, FileMode mode, FileAccess access, FileShare share)\r
+               {\r
+                       return getInfo(path).Open(mode, access, share);\r
+               }\r
+               \r
+               /// <summary>\r
+               /// Open a FileStream for reading and writing\r
+               /// </summary>\r
+               [MonoTODO]\r
+               public static FileStream OpenRead(string path)\r
+               {       // TODO: find out what default share should be\r
+                       return getInfo(path).OpenRead();\r
+               }\r
+               \r
+               /// <summary>\r
+               /// Open a StreamReader\r
+               /// </summary>\r
+               public static StreamReader OpenText(string path)\r
+               {\r
+                       return getInfo(path).OpenText();\r
+               }\r
+\r
+               /// <summary>\r
+               /// Open a FileStream for reading and writing\r
+               /// </summary>\r
+               public FileStream OpenWrite(string path)\r
+               {\r
+                       return getInfo(path).OpenWrite();\r
+               }\r
+               \r
+               /// <summary>\r
+               /// Sets the attributes of file specified by path\r
+               /// </summary>\r
+               public static void SetAttributes(string path, FileAttributes attributes)\r
+               {\r
+                       getInfo(path).Attributes = attributes;\r
+               }\r
                \r
                /// <summary>\r
                /// Sets the creation time of the directory specified by path\r
                /// </summary>\r
                public static void SetCreationTime(string path, DateTime creationTime)\r
-               {
+               {\r
                        getInfo(path).CreationTime = creationTime;\r
                }\r
 \r
@@ -182,21 +191,21 @@ namespace System.IO
                /// Sets the last access time of the directory specified by path\r
                /// </summary>\r
                public static void SetLastAccessTime(string path, DateTime accessTime)\r
-               {
+               {\r
                        getInfo(path).LastAccessTime = accessTime;\r
-               }
+               }\r
                \r
                /// <summary>\r
                /// Sets the last write time of the directory specified by path\r
                /// </summary>\r
                public static void SetLastWriteTime(string path, DateTime modifiedTime)\r
-               {
+               {\r
                        getInfo(path).LastWriteTime = modifiedTime;\r
-               }
-               
-               private static FileInfo getInfo(string path)
-               {
-                       return new FileInfo(path);
-               }
+               }\r
+               \r
+               private static FileInfo getInfo(string path)\r
+               {\r
+                       return new FileInfo(path);\r
+               }\r
        }\r
 }\r
index ed032372939a3312e6014251d84c849c95758fc8..1b02b30ae63e467cdaac911987a2b64ea43a8308 100644 (file)
@@ -9,11 +9,11 @@
 //\r
 //------------------------------------------------------------------------------\r
 \r
-using System;
-using System.PAL;
-using System.Diagnostics;
-using System.Security.Permissions;
-
+using System;\r
+using System.PAL;\r
+using System.Diagnostics;\r
+using System.Security.Permissions;\r
+\r
 namespace System.IO\r
 {\r
        /// <summary>\r
@@ -21,59 +21,59 @@ namespace System.IO
        /// </summary>\r
        public sealed class FileInfo : FileSystemInfo\r
        {\r
-               private OpSys _os = Platform.OS;
-
+               private OpSys _os = Platform.OS;\r
+\r
                public FileInfo(string fileName)\r
-               {
-                       CheckArgument.Path(fileName, false);
-                       //LAMESPEC: Does not throw security exception in constructor
-                       OriginalPath = fileName;
-               }
-
-               private bool existsOnDisk(bool exNotFound, bool exIsDirectory)
-               {
-                       bool bRetCode;
-                       
-                       try
-                       {
-                               Refresh();
-                               if((getAttributes() & FileAttributes.Directory) != 0)
-                               {
-                                       if(exIsDirectory)
-                                       {
-                                               throw new UnauthorizedAccessException();
-                                       }
-                                       bRetCode = false;
-                               }
-                               else
-                               {
-                                       bRetCode = true;
-                               }
-                       }
-                       catch(ArgumentException ex)                             
-                       {
-                               Debug.WriteLine(ex); // eliminates not used warning
-                               if(exNotFound)
-                               {
-                                       throw new FileNotFoundException();
-                               }
-                               bRetCode = false;
-                       }
-                       return bRetCode;
-               }
-               
+               {\r
+                       CheckArgument.Path(fileName, false);\r
+                       //LAMESPEC: Does not throw security exception in constructor\r
+                       OriginalPath = fileName;\r
+               }\r
+\r
+               private bool existsOnDisk(bool exNotFound, bool exIsDirectory)\r
+               {\r
+                       bool bRetCode;\r
+                       \r
+                       try\r
+                       {\r
+                               Refresh();\r
+                               if((getAttributes() & FileAttributes.Directory) != 0)\r
+                               {\r
+                                       if(exIsDirectory)\r
+                                       {\r
+                                               throw new UnauthorizedAccessException();\r
+                                       }\r
+                                       bRetCode = false;\r
+                               }\r
+                               else\r
+                               {\r
+                                       bRetCode = true;\r
+                               }\r
+                       }\r
+                       catch(ArgumentException ex)                             \r
+                       {\r
+                               Debug.WriteLine(ex); // eliminates not used warning\r
+                               if(exNotFound)\r
+                               {\r
+                                       throw new FileNotFoundException();\r
+                               }\r
+                               bRetCode = false;\r
+                       }\r
+                       return bRetCode;\r
+               }\r
+               \r
                public override bool Exists\r
-               {
-                       get
-                       {
-                               return existsOnDisk(false, false);      
-                       }
+               {\r
+                       get\r
+                       {\r
+                               return existsOnDisk(false, false);      \r
+                       }\r
                }\r
 \r
                public override string Name\r
                {\r
                        get\r
-                       {
+                       {\r
                                return Path.GetFileName(getPathName());\r
                        }\r
                }\r
@@ -106,36 +106,39 @@ namespace System.IO
                public long Length\r
                {\r
                        get\r
-                       {
-                               try
-                               {
-                                       Refresh();
-                               }
-                               catch(ArgumentException ex)
-                               {
-                                       Debug.WriteLine(ex); // eliminates not used compiler warning
-                                       throw new FileNotFoundException();
-                               }
-                               return _os.FileLength(getPathName());
+                       {\r
+                               try\r
+                               {\r
+                                       Refresh();\r
+                               }\r
+                               catch(ArgumentException ex)\r
+                               {\r
+                                       Debug.WriteLine(ex); // eliminates not used compiler warning\r
+                                       throw new FileNotFoundException();\r
+                               }\r
+                               return _os.FileLength(getPathName());\r
                        }\r
                }\r
-               
+\r
+               [MonoTODO]\r
                public StreamWriter AppendText()\r
-               {       // TODO: verify using correct FileMode here might be Create & Append
-                       return new StreamWriter(Open(FileMode.Append, FileAccess.Write));
+               {       // TODO: verify using correct FileMode here might be Create & Append\r
+                       return new StreamWriter(Open(FileMode.Append, FileAccess.Write));\r
                }\r
-               \r
+\r
+               [MonoTODO]\r
                public FileStream Create()\r
-               {
-                       // TODO: verify using correct FileMode here
+               {\r
+                       // TODO: verify using correct FileMode here\r
                        return Open(FileMode.OpenOrCreate, FileAccess.ReadWrite);\r
                }\r
 \r
+               [MonoTODO]\r
                public StreamWriter CreateText()\r
-               {       //TODO: According to doc even CreateText throws a file not found ex
-                       //      sounds suspicious so i'll have to check it out later
-                       //existsOnDisk(true, true); // throw not found, is directory
-                       return new StreamWriter(Open(FileMode.Create, FileAccess.Write));
+               {       //TODO: According to doc even CreateText throws a file not found ex\r
+                       //      sounds suspicious so i'll have to check it out later\r
+                       //existsOnDisk(true, true); // throw not found, is directory\r
+                       return new StreamWriter(Open(FileMode.Create, FileAccess.Write));\r
                }\r
                \r
                public FileStream Open(FileMode mode)\r
@@ -146,24 +149,26 @@ namespace System.IO
                public FileStream Open(FileMode mode, FileAccess access)\r
                {\r
                        return Open(mode, access, FileShare.None);\r
-               }
-               
+               }\r
+               \r
                public FileStream Open(FileMode mode, FileAccess access, FileShare share)\r
-               {
-                       bool bExists = existsOnDisk(false, true); // throw is directory;
-                       string path = getPathName();
+               {\r
+                       bool bExists = existsOnDisk(false, true); // throw is directory;\r
+                       string path = getPathName();\r
                    CheckPermission.ModeAccess(mode, access, path, bExists);                    \r
                        return new FileStream(path, mode, access, share);\r
                }\r
 \r
+               [MonoTODO]\r
                public FileStream OpenRead()\r
                {       // TODO: find out what default share should be\r
                        return Open(FileMode.Open, FileAccess.Read, FileShare.Read);\r
                }\r
 \r
+               [MonoTODO]\r
                public StreamReader OpenText()\r
-               {       // TODO: verify mode and access values
-                       return new StreamReader(Open(FileMode.OpenOrCreate, FileAccess.ReadWrite));
+               {       // TODO: verify mode and access values\r
+                       return new StreamReader(Open(FileMode.OpenOrCreate, FileAccess.ReadWrite));\r
                }\r
 \r
                public FileStream OpenWrite()\r
@@ -176,18 +181,20 @@ namespace System.IO
                        return CopyTo(destFile, false);\r
                }\r
 \r
+               [MonoTODO]\r
                public FileInfo CopyTo(string destFile, bool bOverwrite)\r
                {       // TODO: Implement\r
                        return null;\r
                }\r
 \r
                public override void Delete()\r
-               {
-                       existsOnDisk(true, true); // throw not found, is directory
-                       CheckPermission.Demand(FileIOPermissionAccess.AllAccess, getPathName());
-                       _os.DeleteFile(getPathName());
+               {\r
+                       existsOnDisk(true, true); // throw not found, is directory\r
+                       CheckPermission.Demand(FileIOPermissionAccess.AllAccess, getPathName());\r
+                       _os.DeleteFile(getPathName());\r
                }\r
 \r
+               [MonoTODO]\r
                public void MoveTo(string destName)\r
                {       // TODO: Implement\r
                }\r
index 7775269a7b5f5d217386c9d655a1093cfc65d5c2..533e261f094eaef9275861615e989dae7fedcbd8 100755 (executable)
@@ -26,6 +26,7 @@ namespace System.IO {
                {
                }
 
+               [MonoTODO]
                public string FusionLog {
                        get {
                                // FIXME
index f1241e6bcfd1c1d1f3ea01a2d83481c3fb481feb..d88ca254d6bbff0b281920fbf5600b7fb1a04a21 100755 (executable)
@@ -40,6 +40,7 @@ namespace System.IO {
                        }
                }
 
+               [MonoTODO]
                public string FusionLog {
                        get {
                                // FIXME
index 2f90d95b6e3d818817b0554a80d6b8f24dcfb6d2..78401f05c4d0d2c223dfb846d5d4f6add1f97566 100644 (file)
@@ -41,6 +41,7 @@ namespace System.IO
                        FullPath = OriginalPath = String.Empty;
                }
 
+               [MonoTODO]
                public FileAttributes Attributes
                { 
                        get
@@ -53,6 +54,7 @@ namespace System.IO
                        }
                }
 
+               [MonoTODO]
                public DateTime CreationTime
                {
                        get
@@ -95,6 +97,7 @@ namespace System.IO
                        }
                }
 
+               [MonoTODO]
                public DateTime LastAccessTime
                {
                        get
@@ -112,6 +115,7 @@ namespace System.IO
                        }
                }
 
+               [MonoTODO]
                public DateTime LastWriteTime
                {       // TODO: Implement
                        get
@@ -132,11 +136,13 @@ namespace System.IO
                        return getPathName().GetHashCode();
                }
 
+               [MonoTODO]
                public override bool Equals(object obj)
                {       // TODO: Implement
                        return false;
                }
 
+               [MonoTODO]
                new public static bool Equals(object obj1, object obj2)
                {       // TODO: Implement
                        return false;
@@ -170,6 +176,7 @@ namespace System.IO
                        inited = true;
                }
 
+               [MonoTODO]
                private DateTime c2csharpTime(double seconds)
                {       // TODO: determine if UTC time which the 
                        //       calculation below is in is correct
@@ -186,7 +193,8 @@ namespace System.IO
                        }
                        return FullPath;
                } 
-               
+
+               [MonoTODO]
                protected FileAttributes getAttributes()
                {       
                        if(!inited)
index 7d97d8c651b1ce312fb0f07a3b240c2206eeedd0..888a19c3bec6111a864d006cbf0936f9c8ba048e 100644 (file)
@@ -55,6 +55,7 @@ namespace System.IO
                        return extension;
                }
 
+               [MonoTODO]
                public static string Combine(string path1, string path2)
                {
                        if(path1 == null || path2 == null)
@@ -186,6 +187,7 @@ namespace System.IO
                        return null;
                }
 
+               [MonoTODO]
                public static string GetTempFileName()
                {
                        //TODO: Implement method
@@ -195,6 +197,7 @@ namespace System.IO
                /// <summary>
                /// Returns the path of the current systems temp directory
                /// </summary>
+               [MonoTODO]
                public static string GetTempPath()
                {       // TODO: This might vary with distribution and there
                        //       might be an api to provide it. Research is needed
index 2219a7d5a0b04bca88ce137dc31438055db672fa..3175cec0c7c55d1f8b427bca4d67f4d1f1ab07db 100644 (file)
@@ -80,7 +80,8 @@ namespace System.IO {
                                return internalEncoding;\r
                        }\r
                }\r
-       \r
+\r
+               [MonoTODO]\r
                public override int Peek ()\r
                {\r
                        // FIXME: handle encoding....\r
index 5d8b900a86ec75d0abaf5928348061e0c0e79254..d6ac7b70ad5412c2b52b7d8248f0b46ecd727726 100644 (file)
@@ -1,5 +1,5 @@
 //\r
-// System.IO.TextWriter\r
+// System.IO.TextReader\r
 //\r
 // Author: Marcin Szczepanski (marcins@zipworld.com.au)\r
 //\r
@@ -10,6 +10,7 @@ using System;
 \r
 namespace System.IO {\r
 \r
+       [MonoTODO]\r
        public abstract class TextReader : MarshalByRefObject, IDisposable {\r
                \r
                protected TextReader() { }\r
@@ -72,7 +73,8 @@ namespace System.IO {
                { \r
                        return String.Empty;\r
                }\r
-               \r
+\r
+               [MonoTODO]\r
                public static TextReader Synchronised( TextReader reader )\r
                {\r
                         // TODO: Implement\r
index fb48686d678668835af239d2168fd69106a55934..a43ffe331af77d9be29e1aadba3bb400c5cf1917 100644 (file)
@@ -6,7 +6,9 @@
 // TODO: Implement the Thread Safe stuff\r
 \r
 namespace System.IO {\r
-        public abstract class TextWriter : MarshalByRefObject, IDisposable {\r
+\r
+       [MonoTODO]\r
+       public abstract class TextWriter : MarshalByRefObject, IDisposable {\r
                 \r
                 protected TextWriter() {\r
                        coreNewLine = "\n".ToCharArray ();\r
@@ -55,7 +57,8 @@ namespace System.IO {
                {\r
                        // do nothing\r
                }\r
-                \r
+\r
+               [MonoTODO]\r
                 public static TextWriter Synchronised (TextWriter writer)\r
                {\r
                         // TODO: Implement.\r