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

Function callback

packages/core/src/filesystem/watcher.ts:86–92  ·  view source on GitHub ↗
(_error, updates)

Source from the content-addressed store, hash-verified

84 )
85
86 const callback: ParcelWatcher.SubscribeCallback = (_error, updates) => {
87 for (const update of updates) {
88 if (update.type === "create") runFork(events.publish(Event.Updated, { file: update.path, event: "add" }))
89 if (update.type === "update") runFork(events.publish(Event.Updated, { file: update.path, event: "change" }))
90 if (update.type === "delete") runFork(events.publish(Event.Updated, { file: update.path, event: "unlink" }))
91 }
92 }
93
94 const subscribe = (directory: string, ignore: string[]) => {
95 const pending = w.subscribe(directory, callback, { ignore, backend })

Callers 13

updaterHandlerFunction · 0.50
createMainWindowFunction · 0.50
allowRendererPermissionsFunction · 0.50
agentHostFunction · 0.50
catalogHostFunction · 0.50
integrationHostFunction · 0.50
host.tsFile · 0.50
transformFunction · 0.50
fromPromiseFunction · 0.50
saveEditorFunction · 0.50
createOwnerFunction · 0.50
getAuthTokenFunction · 0.50

Calls 2

runForkFunction · 0.85
publishMethod · 0.45

Tested by 1

createOwnerFunction · 0.40