<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0-preview.8.20407.11" />

System.Security.AccessControl.FileSystemAccessRule

public sealed class FileSystemAccessRule : AccessRule
Represents an abstraction of an access control entry (ACE) that defines an access rule for a file or directory. This class cannot be inherited.

Gets the FileSystemRights flags associated with the current FileSystemAccessRule object.

Initializes a new instance of the FileSystemAccessRule class using a reference to a user account, a value that specifies the type of operation associated with the access rule, and a value that specifies whether to allow or deny the operation.

public FileSystemAccessRule(IdentityReference identity, FileSystemRights fileSystemRights, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)

Initializes a new instance of the FileSystemAccessRule class using a reference to a user account, a value that specifies the type of operation associated with the access rule, a value that determines how rights are inherited, a value that determines how rights are propagated, and a value that specifies whether to allow or deny the operation.

public FileSystemAccessRule(string identity, FileSystemRights fileSystemRights, AccessControlType type)

Initializes a new instance of the FileSystemAccessRule class using the name of a user account, a value that specifies the type of operation associated with the access rule, and a value that describes whether to allow or deny the operation.

public FileSystemAccessRule(string identity, FileSystemRights fileSystemRights, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)

Initializes a new instance of the FileSystemAccessRule class using the name of a user account, a value that specifies the type of operation associated with the access rule, a value that determines how rights are inherited, a value that determines how rights are propagated, and a value that specifies whether to allow or deny the operation.