MCPcopy Index your code
hub / github.com/anomalyco/opencode / remap

Function remap

packages/opencode/test/storage/storage.test.ts:32–36  ·  view source on GitHub ↗
(root: string, file: string)

Source from the content-addressed store, hash-verified

30// NOTE: only the 6 methods below are intercepted. If Storage starts using a different
31// FSUtil method that touches Global.Path.data, add it here.
32function remap(root: string, file: string) {
33 if (file === Global.Path.data) return root
34 if (file.startsWith(Global.Path.data + path.sep)) return path.join(root, path.relative(Global.Path.data, file))
35 return file
36}
37
38function remappedFs(root: string) {
39 return Layer.effect(

Callers 1

remappedFsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected