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。
傳回
以 OS 路徑表示的路徑。
備註
路徑來自撰寫的內容,不知道其執行所在的作業系統。 不論作業系統為何,這個方法都會將 / 和 \ 視為分隔符號,這表示將所有 '/' 字元變更為 '/',而 Linux/Mac '\' 則為 '/'。 這可讓作者使用 。。/foo.lg 或 ..\foo.lg 作為匯入的對等專案。