(path)
| 79 | |
| 80 | // Returns the Windows drive prefix ("C:") if present, otherwise null. |
| 81 | function getWindowsDrivePrefix(path) { |
| 82 | if (path.length >= 2 && /^[a-zA-Z]:/.test(path)) { |
| 83 | return path.slice(0, 2) // e.g. "C:" |
| 84 | } |
| 85 | return null |
| 86 | } |
| 87 | |
| 88 | function normalize(path) { |
| 89 | if (!path.length) return '.' |