Share via


PathUtils.NormalizePath(String) Method

Definition

Normalizes authored path to OS-compatible path.

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

Parameters

ambiguousPath
String

authoredPath.

Returns

path expressed as OS path.

Remarks

Path is from authored content which doesn't know what OS it is running on. This method treats / and \ both as separators regardless of OS, for Windows that means changing all `/` characters to `/`, and for Linux/Mac `\` to `/`. This allows author to use ../foo.lg or ..\foo.lg as equivalents for importing.

Applies to