MCPcopy Index your code
hub / github.com/21st-dev/1code / setFileContent

Method setFileContent

src/main/lib/git/cache/git-cache.ts:309–317  ·  view source on GitHub ↗
(
		worktreePath: string,
		filePath: string,
		content: string,
	)

Source from the content-addressed store, hash-verified

307 }
308
309 setFileContent(
310 worktreePath: string,
311 filePath: string,
312 content: string,
313 ): void {
314 const key = `${worktreePath}:${filePath}`;
315 const hash = computeContentHash(content);
316 this.fileContentsCache.set(key, content, hash, content.length * 2);
317 }
318
319 invalidateFileContent(worktreePath: string, filePath: string): void {
320 const key = `${worktreePath}:${filePath}`;

Callers 1

createFileContentsRouterFunction · 0.80

Calls 2

computeContentHashFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected