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

Function touch

packages/app/src/context/file/content-cache.ts:26–30  ·  view source on GitHub ↗
(path: string, bytes?: number)

Source from the content-addressed store, hash-verified

24}
25
26function touch(path: string, bytes?: number) {
27 const prev = lru.get(path)
28 if (prev === undefined && bytes === undefined) return
29 setBytes(path, bytes ?? prev ?? 0)
30}
31
32function remove(path: string) {
33 const prev = lru.get(path)

Callers 2

evictContentLruFunction · 0.70
touchFileContentFunction · 0.70

Calls 2

setBytesFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected