ReparsePointAware.PinHandle(String, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Takes a handle on an existing file or directory to ensure that it cannot move.
public static Microsoft.Win32.SafeHandles.SafeFileHandle PinHandle (string fullPath, bool asDirectory);
static member PinHandle : string * bool -> Microsoft.Win32.SafeHandles.SafeFileHandle
Public Shared Function PinHandle (fullPath As String, asDirectory As Boolean) As SafeFileHandle
Parameters
- fullPath
- String
Full path to the target file or directory.
- asDirectory
- Boolean
Whether the request is on a directory or file.
Returns
SafeFileHandle to the object referenced by fullPath.
Exceptions
Failed to open the handle either because the file or directory did not exist or because the current user has no access.