359
*/
360
static joinPath(uri: URI, ...pathFragment: string[]): URI {
362
throw new Error(`[UriError]: cannot call joinPath on URI without path: ${uri.toString()}`);
363
}
364
>
let newPath: string;
uri.ts
365
>
if (isWindows && uri.scheme === 'file') {
366
newPath = URI.file(paths.win32.join(uriToFsPath(uri, true), ...pathFragment)).path;
368
>
newPath = paths.posix.join(uri.path, ...pathFragment);
369
>
}
370
>
return uri.with({ path: newPath });
371
>
}
372
373
// ---- printing/externalize ---------------------------