PathUtils.NormalizePath(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.