(...segments: string[])
| 109 | * Resolves path segments properly based on whether they appear to be c:/ -style or / style. |
| 110 | */ |
| 111 | export function properResolve(...segments: string[]): string { |
| 112 | if (path.posix.isAbsolute(segments[0])) { |
| 113 | return path.posix.resolve(...segments); |
| 114 | } else if (path.win32.isAbsolute(segments[0])) { |
| 115 | return path.win32.resolve(...segments); |
| 116 | } else { |
| 117 | return path.resolve(...segments); |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | /** |
| 122 | * Resolves path segments properly based on whether they appear to be c:/ -style or / style. |
no test coverage detected