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.
Namespace: DevCase.Core.IO.FileSystemAssembly: 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
)
Public Shared Function WindowsPathToUri (
windowsPath As String
) As Uri
Dim windowsPath As String
Dim returnValue As Uri
returnValue = UtilFileSystem.WindowsPathToUri(windowsPath)
public:
static Uri^ WindowsPathToUri(
String^ windowsPath
)
static member WindowsPathToUri :
windowsPath : string -> Uri
No code example is currently available or this language may not be supported.
- windowsPath String
-
The file or directory path to convert.
Uri
The resulting
Uri object.
This is a code example.
No code example is currently available or this language may not be supported.
Dim windowsPath As String = "C:\Music\100% Greatest Hits\Michael+Jackson\#1-Black Or White.mp3"
Dim fileUri As Uri = FileUtil.WindowsPathToFileUri(windowsPath)
Debug.WriteLine($"{NameOf(fileUri.AbsoluteUri)}: {fileUri.AbsoluteUri}")
Debug.WriteLine($"{NameOf(fileUri.AbsolutePath)}: {fileUri.AbsolutePath}")
Debug.WriteLine($"{NameOf(fileUri.LocalPath)}: {fileUri.LocalPath}")
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.