- rule
- A System.Security.AccessControl.FileSystemAuditRule object that represents an audit rule to remove from a file or directory.
true if the audit rule was removed; otherwise, false
The FileSystemSecurity.RemoveAuditRule(FileSystemAuditRule) method removes either all matching AccessControlType.Deny audit rules or all matching AccessControlType.Allow audit rules from the current System.Security.AccessControl.FileSystemSecurity object. For example, you can use this method to remove all AccessControlType.Deny audit rules for a user by passing a System.Security.AccessControl.FileSystemAuditRule object created using the AccessControlType.Deny value, the AuditFlags.Failure value, and a user account. When you do this, the FileSystemSecurity.RemoveAuditRule(FileSystemAuditRule) method removes any deny rules that specify the AuditFlags.Failure value or the AuditFlags.Success value.