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

Function normalizePathPattern

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

Source from the content-addressed store, hash-verified

218 }
219
220 export function normalizePathPattern(p: string): string {
221 if (process.platform !== "win32") return p
222 if (p === "*") return p
223 const match = p.match(/^(.*)[\\/]\*$/)
224 if (!match) return normalizePath(p)
225 const dir = /^[A-Za-z]:$/.test(match[1]) ? match[1] + "\\" : match[1]
226 return join(normalizePath(dir), "*")
227 }
228
229 export function resolve(p: string): string {
230 const resolved = pathResolve(windowsPath(p))

Callers

nothing calls this directly

Calls 2

joinFunction · 0.85
normalizePathFunction · 0.70

Tested by

no test coverage detected