Share via


ReparsePointAware.RequireSamePath(SafeFileHandle, String) Method

Definition

Throws UnauthorizedAccessException if the given SafeFileHandle's canonical path is not the same as expectedPath.

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)

Parameters

handle
SafeFileHandle

SafeHandle to the file to check.

expectedPath
String

Path to check the handle against.

Exceptions

The path contains Windows Reparse Points or otherwise cannot be accessed.

Applies to