FileSystemAclExtensions.GetAccessControl 方法

定义

重载

GetAccessControl(DirectoryInfo)

返回目录的安全信息。

GetAccessControl(FileInfo)

返回文件的安全信息。

GetAccessControl(FileStream)

返回文件的安全信息。

GetAccessControl(DirectoryInfo, AccessControlSections)

返回目录的安全信息。

GetAccessControl(FileInfo, AccessControlSections)

返回文件的安全信息。

GetAccessControl(DirectoryInfo)

返回目录的安全信息。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Security::AccessControl::DirectorySecurity ^ GetAccessControl(System::IO::DirectoryInfo ^ directoryInfo);
public static System.Security.AccessControl.DirectorySecurity GetAccessControl (this System.IO.DirectoryInfo directoryInfo);
static member GetAccessControl : System.IO.DirectoryInfo -> System.Security.AccessControl.DirectorySecurity
<Extension()>
Public Function GetAccessControl (directoryInfo As DirectoryInfo) As DirectorySecurity

参数

directoryInfo
DirectoryInfo

一个要从中获取安全信息的现有目录。

返回

目录的所有访问控制部分的安全描述符。

适用于

GetAccessControl(FileInfo)

返回文件的安全信息。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Security::AccessControl::FileSecurity ^ GetAccessControl(System::IO::FileInfo ^ fileInfo);
public static System.Security.AccessControl.FileSecurity GetAccessControl (this System.IO.FileInfo fileInfo);
static member GetAccessControl : System.IO.FileInfo -> System.Security.AccessControl.FileSecurity
<Extension()>
Public Function GetAccessControl (fileInfo As FileInfo) As FileSecurity

参数

fileInfo
FileInfo

一个要从中获取安全信息的文件。

返回

文件的所有访问控制部分的安全描述符。

适用于

GetAccessControl(FileStream)

返回文件的安全信息。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Security::AccessControl::FileSecurity ^ GetAccessControl(System::IO::FileStream ^ fileStream);
public static System.Security.AccessControl.FileSecurity GetAccessControl (this System.IO.FileStream fileStream);
static member GetAccessControl : System.IO.FileStream -> System.Security.AccessControl.FileSecurity
<Extension()>
Public Function GetAccessControl (fileStream As FileStream) As FileSecurity

参数

fileStream
FileStream

一个要从中获取安全信息的现有文件。

返回

文件的所有访问控制部分的安全描述符。

例外

fileStreamnull

文件流已关闭。

适用于

GetAccessControl(DirectoryInfo, AccessControlSections)

返回目录的安全信息。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Security::AccessControl::DirectorySecurity ^ GetAccessControl(System::IO::DirectoryInfo ^ directoryInfo, System::Security::AccessControl::AccessControlSections includeSections);
public static System.Security.AccessControl.DirectorySecurity GetAccessControl (this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.AccessControlSections includeSections);
static member GetAccessControl : System.IO.DirectoryInfo * System.Security.AccessControl.AccessControlSections -> System.Security.AccessControl.DirectorySecurity
<Extension()>
Public Function GetAccessControl (directoryInfo As DirectoryInfo, includeSections As AccessControlSections) As DirectorySecurity

参数

directoryInfo
DirectoryInfo

一个要从中获取安全信息的现有目录。

includeSections
AccessControlSections

要检索的必需访问控制部分。

返回

目录的指定访问控制部分的安全描述符。

适用于

GetAccessControl(FileInfo, AccessControlSections)

返回文件的安全信息。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Security::AccessControl::FileSecurity ^ GetAccessControl(System::IO::FileInfo ^ fileInfo, System::Security::AccessControl::AccessControlSections includeSections);
public static System.Security.AccessControl.FileSecurity GetAccessControl (this System.IO.FileInfo fileInfo, System.Security.AccessControl.AccessControlSections includeSections);
static member GetAccessControl : System.IO.FileInfo * System.Security.AccessControl.AccessControlSections -> System.Security.AccessControl.FileSecurity
<Extension()>
Public Function GetAccessControl (fileInfo As FileInfo, includeSections As AccessControlSections) As FileSecurity

参数

fileInfo
FileInfo

一个要从中获取安全信息的现有文件。

includeSections
AccessControlSections

要从文件中检索的必需访问控制部分。

返回

文件的指定访问控制部分的安全描述符。

适用于