Stream. Set Access Control(FileSecurity) Method
public: void SetAccessControl(System::Security::AccessControl::FileSecurity ^ fileSecurity);
public void SetAccessControl (System.Security.AccessControl.FileSecurity fileSecurity);
member this.SetAccessControl : System.Security.AccessControl.FileSecurity -> unit
An object that describes an ACL entry to apply to the current file.
The file is closed.
fileSecurity parameter is
The file could not be found or modified.
The current process does not have access to open the file.
The SetAccessControl method applies access control list (ACL) entries to a file that represents the noninherited ACL list.
The ACL specified for the
fileSecurity parameter replaces the existing ACL for the file. To add permissions for a new user, use the GetAccessControl method to obtain the existing ACL, modify it, and then use SetAccessControl to apply it back to the file.
An ACL describes individuals and/or groups who have, or do not have, rights to specific actions on the given file. For more information, see How to: Add or Remove Access Control List Entries.