ReparsePointAware.PinAndRequireNoReparsePoints(String, Boolean) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將 SafeFileHandle 開啟至現有的檔案或目錄,並確認產生的標準路徑符合指定路徑的規範路徑。 產生的 SafeFileHandle 是 IDisposable,而且可以在 using 語句內使用,以確保後續的檔案作業會寫入路徑,而不需重新分析點。
public static Microsoft.Win32.SafeHandles.SafeFileHandle PinAndRequireNoReparsePoints(string expectedPath, bool asDirectory);
static member PinAndRequireNoReparsePoints : string * bool -> Microsoft.Win32.SafeHandles.SafeFileHandle
Public Shared Function PinAndRequireNoReparsePoints (expectedPath As String, asDirectory As Boolean) As SafeFileHandle
參數
- expectedPath
- String
要釘選的預期路徑。
- asDirectory
- Boolean
無論是檔案或目錄路徑。
傳回
SafeFileHandle 至指定的檔案/目錄。
例外狀況
路徑包含 Windows 重新分析點,否則無法存取。