MCPcopy Index your code
hub / github.com/codeaashu/claude-code / canonicalizePath

Function canonicalizePath

src/utils/sessionStoragePortable.ts:339–345  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

337 * /tmp → /private/tmp on macOS) resolve to the same project directory.
338 */
339export async function canonicalizePath(dir: string): Promise<string> {
340 try {
341 return (await realpath(dir)).normalize('NFC')
342 } catch {
343 return dir.normalize('NFC')
344 }
345}
346
347/**
348 * Finds the project directory for a given path, tolerating hash mismatches

Callers 2

gatherProjectCandidatesFunction · 0.85
resolveSessionFilePathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected