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

System.Security.AccessControl.FileSystemSecurity

public abstract class FileSystemSecurity : NativeObjectSecurity
Represents the access control and audit security for a file or directory.

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

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

Removes all matching allow or deny access control list (ACL) permissions from the current file or directory.

Removes all access control list (ACL) permissions for the specified user from the current file or directory.

Removes a single matching allow or deny access control list (ACL) permission from the current file or directory.

Removes all matching allow or deny audit rules from the current file or directory.

Removes all audit rules for the specified user from the current file or directory.

Removes a single matching allow or deny audit rule from the current file or directory.

Adds the specified access control list (ACL) permission to the current file or directory and removes all matching ACL permissions.

Sets the specified access control list (ACL) permission for the current file or directory.

Sets the specified audit rule for the current file or directory.