ReparsePointAware.RequireSamePath(SafeFileHandle, String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
如果指定的 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,否則無法存取。