FileSetAccessControl Method (SafeFileHandle, FileSecurity, AccessControlSections) |
Applies access control list (ACL) entries described by a
FileSecurity FileSecurity object to the specified file.
Namespace:
Alphaleonis.Win32.Filesystem
Assembly:
AlphaFS (in AlphaFS.dll) Version: 2.0
Syntax public static void SetAccessControl(
SafeFileHandle handle,
FileSecurity fileSecurity,
AccessControlSections includeSections
)
Public Shared Sub SetAccessControl (
handle As SafeFileHandle,
fileSecurity As FileSecurity,
includeSections As AccessControlSections
)
public:
static void SetAccessControl(
SafeFileHandle^ handle,
FileSecurity^ fileSecurity,
AccessControlSections includeSections
)
static member SetAccessControl :
handle : SafeFileHandle *
fileSecurity : FileSecurity *
includeSections : AccessControlSections -> unit
Parameters
- handle
- Type: Microsoft.Win32.SafeHandlesSafeFileHandle
A SafeFileHandle to a file to add or remove access control list (ACL) entries from. - fileSecurity
- Type: System.Security.AccessControlFileSecurity
A FileSecurity object that describes an ACL entry to apply to the file described by the handle parameter. - includeSections
- Type: System.Security.AccessControlAccessControlSections
One or more of the AccessControlSections values that specifies the type of access control list (ACL) information to set.
Exceptions See Also