* Whether two paths name one directory, however each is spelled. For * comparing only: the paths this module returns keep their own spelling. * * git answers with the on-disk spelling (a `subst` drive and links followed, * the case stored on disk), while callers hand in theirs: VS Code and Curso
(a: string, b: string)
| 199 | * falling back to the JS realpath where the native call fails. |
| 200 | */ |
| 201 | function sameDirectory(a: string, b: string): boolean { |
| 202 | return a === b || directoryIdentity(a) === directoryIdentity(b); |
| 203 | } |
| 204 | |
| 205 | function directoryIdentity(p: string): string { |
| 206 | const real = nativeRealpath(p); |
no test coverage detected