(path: string)
| 253 | } |
| 254 | |
| 255 | function splitCurrentPath(path: string) { |
| 256 | path = path.replace(/\\/g, "/"); |
| 257 | let drive = ""; |
| 258 | const driveMatch = path.match(/^([a-zA-Z]:)(\/|$)/); |
| 259 | if (driveMatch) { |
| 260 | drive = driveMatch[1]; |
| 261 | path = path.substring(drive.length); |
| 262 | } |
| 263 | const parts = path.split("/").filter((p) => p !== ""); |
| 264 | return { drive, parts }; |
| 265 | } |
| 266 | |
| 267 | function splitRelativePath(relativePath: string) { |
| 268 | relativePath = relativePath.replace(/\\/g, "/"); |
no outgoing calls
no test coverage detected