toWindowsPath function
To windows path (same result than posix)
/a/b => \a\b \a/b => \a\b /c:/ => C:\
Implementation
String toWindowsPath(String anyPath) {
var context = windows;
var parts = contextPathSplit(context, anyPath);
// Handle C:\xxx
if (parts.length > 1 && parts[1].endsWith(':')) {
parts = parts.sublist(1);
}
return context.joinAll(parts);
}