UtilFileSystemWindowsPathToUri Method

Converts a Microsoft Windows Path string to Uri.

For example, "C:\Music\100% Greatest Hits\Michael+Jackson\#1-Black Or White.mp3" returns a Uri object with AbsoluteUri value: "file:///C:/Music/100%25%20Greatest%20Hits/Michael+Jackson/%231-Black%20Or%20White.mp3".

WindowsPathToUri(String) function is provided because none of the Uri constructors correctly handles certain paths.

Definition

Namespace: DevCase.Core.IO.FileSystem
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static Uri WindowsPathToUri(
	string windowsPath
)

Parameters

windowsPath  String
The file or directory path to convert.

Return Value

Uri
The resulting Uri object.

Remarks

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also