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

Function normalizePath

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

Source from the content-addressed store, hash-verified

208 }
209
210 export function normalizePath(p: string): string {
211 if (process.platform !== "win32") return p
212 const resolved = pathResolve(windowsPath(p))
213 try {
214 return realpathSync.native(resolved)
215 } catch {
216 return resolved
217 }
218 }
219
220 export function normalizePathPattern(p: string): string {
221 if (process.platform !== "win32") return p

Callers 2

normalizePathPatternFunction · 0.70
resolveFunction · 0.70

Calls 1

windowsPathFunction · 0.70

Tested by

no test coverage detected