mscorlib 2.0.0.0 4.0.0.0 System.Security.AccessControl.FileSystemSecurity

The class specifies the access rights for a system file and how access attempts are audited. This class represents access and audit rights as a set of rules. Each access rule is represented by a object, while each audit rule is represented by a object.

The class is an abstraction of the underlying Microsoft Windows file security system. In this system, each file has a discretionary access control list (DACL), which controls access to the file, and a system access control list (SACL), which specifies the access control attempts that are audited. The and classes are abstractions of the access control entries (ACEs) that comprise DACLs and SACLs.

The class hides many of the details of DACLs and SACLs; you do not have to worry about ACE ordering or null DACLS.

Use the class to retrieve, add, or change the access rules that represent the DACL and SACL of a file.

To persist new or changed access or audit rules to a file, use the method. To retrieve access or audit rules from an existing file, use the method.

Represents the access control and audit security for a file. This class cannot be inherited.

- Constructor
  2.0.0.0
  4.0.0.0

  Use this constructor when you want to create an empty object that is not based on an existing file. You can then populate the object with access control information and apply it to a file.

  You can add access or audit rules to the object using the method. You can remove access or audit rules using the method.

  To persist new or changed access or audit rules to a file, use the or method. To retrieve access or audit rules from an existing file, use the or method.

  Initializes a new instance of the class.

- Constructor
  2.0.0.0
  4.0.0.0

  This constructor retrieves the access control information for the specified file and then creates a object that encapsulates that information. You can then inspect, add, or delete the access control information for the specified file.

  You can add access or audit rules to the object using the method. You can remove access or audit rules using the method.

  To persist new or changed access or audit rules to a file, use the or method. To retrieve access or audit rules from an existing file, use the or method.

  Initializes a new instance of the class from a specified file using the specified values of the enumeration.

  The location of a file to create a object from.
  One of the values that specifies the type of access control list (ACL) information to retrieve.