(absolutePath: string)
| 332 | * different from {@link absolutePathToFileUrl}, but should be more correct. |
| 333 | */ |
| 334 | export function absolutePathToFileUrlWithDetection(absolutePath: string): string { |
| 335 | if (!absolutePath.startsWith('/')) { |
| 336 | return 'file:///' + platformPathToUrlPath(absolutePath); |
| 337 | } |
| 338 | return 'file://' + platformPathToUrlPath(absolutePath); |
| 339 | } |
| 340 | |
| 341 | /** |
| 342 | * Returns whether the path is a Windows or posix path. |
no test coverage detected