(absolutePath: string)
| 244 | |
| 245 | // TODO: this does not escape/unescape special characters, but it should. |
| 246 | export function absolutePathToFileUrl(absolutePath: string): string { |
| 247 | if (process.platform === 'win32') { |
| 248 | return 'file:///' + platformPathToUrlPath(absolutePath); |
| 249 | } |
| 250 | return 'file://' + platformPathToUrlPath(absolutePath); |
| 251 | } |
| 252 | |
| 253 | /** |
| 254 | * Returns whether the path is a Windows or posix path. |
no test coverage detected