语言

PathUtils.NormalizePath(String) 方法

定义

将作者路径规范化为操作系统兼容路径。

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 作为导入的等价物。

适用于