625
*/
626
export function uriToFsPath(uri: URI, keepDriveLetterCasing: boolean): string {
628
>
let value: string;
629
>
if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {
630
// unc path: file://shares/c$/far/boo
631
value = `//${uri.authority}${uri.path}`;
632
} else if (
633
>
uri.path.charCodeAt(0) === CharCode.Slash
uri.ts
634
>
&& (uri.path.charCodeAt(1) >= CharCode.A && uri.path.charCodeAt(1) <= CharCode.Z || uri.path.charCodeAt(1) >= CharCode.a && uri.path.charCodeAt(1) <= CharCode.z)
635
&& uri.path.charCodeAt(2) === CharCode.Colon
637
if (!keepDriveLetterCasing) {
638
// windows drive letter: file:///c:/far/boo