(fsPath: string, offset = 0)
| 82 | } |
| 83 | |
| 84 | function hasDriveLetter(fsPath: string, offset = 0): boolean { |
| 85 | if (fsPath.length >= 2 + offset) { |
| 86 | // Checks C:\Users |
| 87 | // ^^ |
| 88 | const char0 = fsPath.charCodeAt(0 + offset); |
| 89 | const char1 = fsPath.charCodeAt(1 + offset); |
| 90 | return ( |
| 91 | char1 === CharCode.Colon && |
| 92 | ((char0 >= CharCode.A && char0 <= CharCode.Z) || |
| 93 | (char0 >= CharCode.a && char0 <= CharCode.z)) |
| 94 | ); |
| 95 | } |
| 96 | return false; |
| 97 | } |
| 98 | |
| 99 | function isPathSeparator(code: number): boolean { |
| 100 | return code === CharCode.Slash || code === CharCode.Backslash; |
no outgoing calls
no test coverage detected