Method PrepareFileUrl
PrepareFileUrl(string)
Prepends filename with "file" url protocol prefix.
public static string PrepareFileUrl(string filename)
Parameters
filename
stringPath to the file.
Returns
Remarks
Under Windows file path starts with drive letter, so we need to add additional "/" separator between protocol and file path. This functions checks for OS and adds "file" url protocol correctly. Also spaces are replaced with %20, other non url chars are replaced with corresponding html codes.