#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
public static void SetAccessControl (string path,
FileSecurity fileSecurity)
{
- throw new NotImplementedException ();
+ if (null == fileSecurity)
+ throw new ArgumentNullException ("fileSecurity");
+
+ fileSecurity.PersistModifications (path);
}
#endif
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));