I have a task to write an object that can receive a different type of paths/urls, and return what type of path/url it is. For example the path can be
1. [drive]:\Temp
2. \\Temp
3. Temp (assuming that it relative Temp),
4. /Temp
5. ~/Temp
6. file://[drive]:/Temp
7. file://Temp
8. [scheme]://something/Temp
...and so on.
How I can check in C#
if it's physical path, relative url, or absolute url?
I think it's relatively easy to know if it's relative or absolute uri, but how to know if it's UNC path?
I tried to use Uri object and it's IsUnc property, but it not really helps me....for c:\temp it returns false, for "/temp", "temp/" and "temp" it throws an exception that format is incorrect. Does exists any built in object in .NET 3.5
that can help me with this, or what algorithm i can use to determine the type of path?