ReparsePointAware.RequireSamePath(SafeFileHandle, String) 方法

定義

如果指定的 SafeFileHandle 標準路徑與 expectedPath 不同,則會擲回 UnauthorizedAccessException。

public static void RequireSamePath (Microsoft.Win32.SafeHandles.SafeFileHandle handle, string expectedPath);
static member RequireSamePath : Microsoft.Win32.SafeHandles.SafeFileHandle * string -> unit
Public Shared Sub RequireSamePath (handle As SafeFileHandle, expectedPath As String)

參數

handle
SafeFileHandle

要檢查之檔案的 SafeHandle。

expectedPath
String

檢查句柄的路徑。

例外狀況

路徑包含 Windows Reparse Points,否則無法存取。

適用於