MCPcopy Create free account
hub / github.com/anomalyco/opencode / resolve

Function resolve

packages/core/src/fs-util.ts:229–237  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

227 }
228
229 export function resolve(p: string): string {
230 const resolved = pathResolve(windowsPath(p))
231 try {
232 return normalizePath(realpathSync(resolved))
233 } catch (e: any) {
234 if (e?.code === "ENOENT") return normalizePath(resolved)
235 throw e
236 }
237 }
238
239 export function windowsPath(p: string): string {
240 if (process.platform !== "win32") return p

Callers

nothing calls this directly

Calls 2

windowsPathFunction · 0.70
normalizePathFunction · 0.70

Tested by

no test coverage detected