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

System.Security.AccessControl.DirectorySecurity

public sealed class DirectorySecurity : FileSystemSecurity
Represents the access control and audit security for a directory. This class cannot be inherited.

Initializes a new instance of the DirectorySecurity class.

public DirectorySecurity(string name, AccessControlSections includeSections)

Initializes a new instance of the DirectorySecurity class from a specified directory using the specified values of the AccessControlSections enumeration.