共用方式為


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

要從檔案中擷取的所需存取控制區段。

傳回

檔案指定存取控制區段的安全性描述元。

適用於