81
82
} else if (isWindowsDriveLetter(firstLetter)) {
83
>
// check for windows drive letter c:\ or c:
extpath.ts
84
>
85
>
if (path.charCodeAt(1) === CharCode.Colon) {
86
>
if (isPathSeparator(path.charCodeAt(2))) {
87
>
// C:\fff
88
>
// ^^^
89
>
return path.slice(0, 2) + sep;
90
>
} else {
91
>
// C:
92
>
// ^^
93
>
return path.slice(0, 2);
94
>
}
95
>
}
96
>
}
97
>
98
>
// check for URI
99
>
// scheme://authority/path
100
>
// ^^^^^^^^^^^^^^^^^^^
101
>
let pos = path.indexOf('://');
102
>
if (pos !== -1) {
103
>
pos += 3; // 3 -> "://".length
104
>
for (; pos < len; pos++) {
105
>
if (isPathSeparator(path.charCodeAt(pos))) {
106
>
return path.slice(0, pos + 1); // consume this separator
107
>
}
108
>
}
109
>
}
110
>
111
>
return '';
112
>
}
113
114
/**