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

Function resolveDirectoryIndex

packages/opencode/src/plugin/shared.ts:121–126  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

119}
120
121async function resolveDirectoryIndex(dir: string) {
122 for (const name of INDEX_FILES) {
123 const file = path.join(dir, name)
124 if (await Filesystem.exists(file)) return file
125 }
126}
127
128async function resolveTargetDirectory(target: string) {
129 const file = targetPath(target)

Callers 2

resolvePluginEntrypointFunction · 0.85
resolvePathPluginTargetFunction · 0.85

Calls 1

existsMethod · 0.45

Tested by

no test coverage detected