PathUtils.NormalizePath(String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將作者路徑正規化為作業系統相容路徑。
public static string NormalizePath(string ambiguousPath);
static member NormalizePath : string -> string
Public Shared Function NormalizePath (ambiguousPath As String) As String
參數
- ambiguousPath
- String
authoredPath。
傳回
路徑以作業系統路徑表示。
備註
路徑來自作者內容,但作者不知道自己在哪個作業系統上運行。 此方法將 / 與 \ 視為分隔符,不論作業系統為何,對 Windows 來說,將所有 '/' 字元改為 '/',對 Linux/Mac 則是將 '\' 改為 '/'。 這讓作者可以使用....../foo.lg 或 ..\foo.lg 作為匯入的等價物。