internal static string GetScheme(string/*!*/ path)
{
int colon_index = path.IndexOf(':');
// When there is not scheme present (or it's a local path) return "file".
if (colon_index == -1 || Path.IsPathRooted(path))
return "file";
// Otherwise assume that it's the string before first ':'.
return path.Substring(0, colon_index);
}