This documentation is archived and is not being maintained.

FileSystemSecurity.AddAccessRule Method

Adds the specified access control list (ACL) permission to the current file or directory.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Protected method AddAccessRule(AccessRule) Adds the specified access rule to the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object. (Inherited from CommonObjectSecurity.)
Public method AddAccessRule(FileSystemAccessRule) Adds the specified access control list (ACL) permission to the current file or directory.
Top

The AddAccessRule method adds a new rule to the list of rules contained within a FileSystemSecurity object.

To persist new or changed access control list (ACL) information to a file, use the SetAccessControl or SetAccessControl method. To persist new or changed ACL information to a directory, use the SetAccessControl or SetAccessControl method.

To retrieve ACL information from a file, use the GetAccessControl or GetAccessControl method. To retrieve ACL information from a directory, use the GetAccessControl or GetAccessControl method.

Show: