PathUtils.NormalizePath(String) 方法

定义

规范化 OS 兼容路径的创作路径。

public static string NormalizePath(string ambiguousPath);
static member NormalizePath : string -> string
Public Shared Function NormalizePath (ambiguousPath As String) As String

参数

ambiguousPath
String

authoredPath。

返回

表示为 OS 路径的路径。

注解

路径来自创作的内容,该内容不知道它在哪个操作系统上运行。 此方法将 / 和 \ 都视为分隔符,而不考虑操作系统,对于 Windows,这意味着将所有“/”字符更改为“/”,对于 Linux/Mac,将“\”更改为“/”。 这允许作者使用 。/foo.lg 或 ..\foo.lg 作为导入的等效项。

适用于