You've already forked linux-packaging-mono
Imported Upstream version 6.0.0.172
Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
parent
8016999e4d
commit
64ac736ec5
31
mcs/class/corlib/corefx/File.cs
Normal file
31
mcs/class/corlib/corefx/File.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Security.AccessControl;
|
||||
|
||||
namespace System.IO
|
||||
{
|
||||
public partial class File
|
||||
{
|
||||
public static FileSecurity GetAccessControl (string path)
|
||||
{
|
||||
// AccessControlSections.Audit requires special permissions.
|
||||
return GetAccessControl (path,
|
||||
AccessControlSections.Owner |
|
||||
AccessControlSections.Group |
|
||||
AccessControlSections.Access);
|
||||
}
|
||||
|
||||
public static FileSecurity GetAccessControl (string path, AccessControlSections includeSections)
|
||||
{
|
||||
return new FileSecurity (path, includeSections);
|
||||
}
|
||||
|
||||
public static void SetAccessControl (string path,
|
||||
FileSecurity fileSecurity)
|
||||
{
|
||||
if (null == fileSecurity)
|
||||
throw new ArgumentNullException ("fileSecurity");
|
||||
|
||||
fileSecurity.PersistModifications (path);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user