(path: string)
| 823 | const replaceWindowsDriveRE = /^([A-Z]):\// |
| 824 | const linuxAbsolutePathRE = /^\/[^/]/ |
| 825 | function escapeToLinuxLikePath(path: string) { |
| 826 | if (windowsDriveRE.test(path)) { |
| 827 | return path.replace(replaceWindowsDriveRE, '/windows/$1/') |
| 828 | } |
| 829 | if (linuxAbsolutePathRE.test(path)) { |
| 830 | return `/linux${path}` |
| 831 | } |
| 832 | return path |
| 833 | } |
| 834 | |
| 835 | const revertWindowsDriveRE = /^\/windows\/([A-Z])\// |
| 836 | function unescapeToLinuxLikePath(path: string) { |