(uri: URI, platform: NodeJS.Platform)
| 22 | } |
| 23 | |
| 24 | export function uriToFsPath(uri: URI, platform: NodeJS.Platform): string { |
| 25 | |
| 26 | let value: string; |
| 27 | if (uri.authority && uri.path.length > 1 && (uri.scheme === 'file' || uri.scheme === CLIHostDocuments.scheme)) { |
| 28 | // unc path: file://shares/c$/far/boo |
| 29 | value = `//${uri.authority}${uri.path}`; |
| 30 | } else if ( |
| 31 | uri.path.charCodeAt(0) === CharCode.Slash |
| 32 | && (uri.path.charCodeAt(1) >= CharCode.A && uri.path.charCodeAt(1) <= CharCode.Z || uri.path.charCodeAt(1) >= CharCode.a && uri.path.charCodeAt(1) <= CharCode.z) |
| 33 | && uri.path.charCodeAt(2) === CharCode.Colon |
| 34 | ) { |
| 35 | // windows drive letter: file:///c:/far/boo |
| 36 | value = uri.path[1].toLowerCase() + uri.path.substr(2); |
| 37 | } else { |
| 38 | // other path |
| 39 | value = uri.path; |
| 40 | } |
| 41 | if (platform === 'win32') { |
| 42 | value = value.replace(/\//g, '\\'); |
| 43 | } |
| 44 | return value; |
| 45 | } |
| 46 | |
| 47 | export function getWellKnownDevContainerPaths(path_: typeof path.posix | typeof path.win32, folderPath: string): string[] { |
| 48 | return [ |
no outgoing calls
no test coverage detected