Merge branch 'msbuilddll2'
[mono.git] / mcs / class / corlib / System.IO / File.cs
index d9335146477f86cd3707547ab71117d659296275..79486b165a8811a7a805b50327187b4ce4cda215 100644 (file)
@@ -188,12 +188,16 @@ namespace System.IO
 #if !NET_2_1
                public static FileSecurity GetAccessControl (string path)
                {
-                       throw new NotImplementedException ();
+                       // AccessControlSections.Audit requires special permissions.
+                       return GetAccessControl (path,
+                                                AccessControlSections.Owner |
+                                                AccessControlSections.Group |
+                                                AccessControlSections.Access);
                }
                
                public static FileSecurity GetAccessControl (string path, AccessControlSections includeSections)
                {
-                       throw new NotImplementedException ();
+                       return new FileSecurity (path, includeSections);
                }
 #endif
 
@@ -412,7 +416,10 @@ namespace System.IO
                public static void SetAccessControl (string path,
                                                     FileSecurity fileSecurity)
                {
-                       throw new NotImplementedException ();
+                       if (null == fileSecurity)
+                               throw new ArgumentNullException ("fileSecurity");
+
+                       fileSecurity.PersistModifications (path);
                }
 #endif
 
@@ -609,7 +616,7 @@ namespace System.IO
                        throw new NotSupportedException (Locale.GetText ("File encryption isn't supported on any file system."));
                }
 
-#if MOONLIGHT || NET_4_0
+#if NET_4_0
                public static IEnumerable<string> ReadLines (string path)
                {
                        return ReadLines (File.OpenText (path));