(a: string, b: string)
| 350 | * has no usable inode, so it compares the on-disk-cased native realpaths. |
| 351 | */ |
| 352 | export function isSameIndexRoot(a: string, b: string): boolean { |
| 353 | if (a === b) return true; |
| 354 | if (process.platform === 'win32') { |
| 355 | try { |
| 356 | return fs.realpathSync.native(getCodeGraphDir(a)) === fs.realpathSync.native(getCodeGraphDir(b)); |
| 357 | } catch { |
| 358 | return false; |
| 359 | } |
| 360 | } |
| 361 | const id = statInode(getCodeGraphDir(a)); |
| 362 | return id !== null && id === statInode(getCodeGraphDir(b)); |
| 363 | } |
| 364 | |
| 365 | export function findNearestCodeGraphRoot(startPath: string): string | null { |
| 366 | let current = path.resolve(startPath); |
no test coverage detected