1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
static string GetCanonicalPath (string file)
{
try
{
file = file.Replace(@"\", "/");
return "file:///" + file;
}
catch (System.Exception ex)
{
throw ex;
}
}
static string GetAbsoluteFromCanonicalPath(string file)
{
try
{
file = file.Replace("/", @"\");
return (file.Substring(8));
}
catch (System.Exception ex)
{
throw ex;
}
}
|