Partilhar via


FileSystemProvider.NewSecurityDescriptorFromPath Method

Definition

Creates a new empty security descriptor of the same type as the item specified by the path. If "path" points to a file system directory, then the descriptor returned will be of type DirectorySecurity.

public:
 virtual System::Security::AccessControl::ObjectSecurity ^ NewSecurityDescriptorFromPath(System::String ^ path, System::Security::AccessControl::AccessControlSections sections);
public System.Security.AccessControl.ObjectSecurity NewSecurityDescriptorFromPath (string path, System.Security.AccessControl.AccessControlSections sections);
abstract member NewSecurityDescriptorFromPath : string * System.Security.AccessControl.AccessControlSections -> System.Security.AccessControl.ObjectSecurity
override this.NewSecurityDescriptorFromPath : string * System.Security.AccessControl.AccessControlSections -> System.Security.AccessControl.ObjectSecurity
Public Function NewSecurityDescriptorFromPath (path As String, sections As AccessControlSections) As ObjectSecurity

Parameters

path
String

Path of the item to use to determine the type of resulting SecurityDescriptor.

sections
AccessControlSections

The sections of the security descriptor to create.

Returns

A new ObjectSecurity object of the same type as the item specified by the path.

Implements

Applies to