I want to use functions of Path class (GetDirectoryName
, GetFileName
, Combine
,etc.) with paths in URL format with slash (/).
E
I'm afraid GetDirectoryName
, GetFileName
, Combine
,etc. use Path.DirectorySeparatorChar in the definition and you want Path.AltDirectorySeparatorChar.
And since Path is a sealed class, I think the only way to go about is string replacement.You can replace Path.DirectorySeparatorChar
('\') with Path.AltDirectorySeparatorChar
('/') and Path.VolumeSeparatorChar
(':') with ":/"