System.Security.AccessControl.FileSystemSecurity.AddAuditRule Method

Adds the specified audit rule to the current file or directory.

Syntax

public void AddAuditRule (FileSystemAuditRule rule)

Parameters

rule
A System.Security.AccessControl.FileSystemAuditRule object that represents an audit rule to add to a file or directory.

Remarks

The FileSystemSecurity.AddAuditRule(FileSystemAuditRule) method adds a new audit rule to the list of rules contained within a System.Security.AccessControl.FileSystemSecurity object.

If an audit rule already exists for the specified rule, the FileSystemSecurity.AddAuditRule(FileSystemAuditRule) method will still add the rule.

Requirements

Namespace: System.Security.AccessControl
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0