Share via


Extensions.NormalizePath(String) Method

Definition

Normalize authored path to OS path.

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

Parameters

ambiguousPath
String

Authored path.

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 / -> \ and for Linux/Mac \ -> /. This allows author to use ../foo.lg or ..\foo.lg as equivalents for importing.

Applies to