Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UNC path to File URI

Tags:

file

uri

unc

how to convert UNC path to File URI.. For my application user will give css UNC path like this in test box :

\\egng4573\D$\CSS\Style.css

how can i change it to :

file:///D:/CSS/Style.css

so that firefox and IE both can access css from the desired path and apply on them.. please tell....

like image 754
Maybe2013 Avatar asked Feb 05 '26 08:02

Maybe2013


1 Answers

In .NET,

let unc = @"\\egng4573\D$\CSS\Style.css"

then

new System.Uri(unc)

should do it.

val it : System.Uri = file://egng4573/D$/CSS/Style.css
like image 188
Pete Montgomery Avatar answered Feb 09 '26 03:02

Pete Montgomery



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!