MCPcopy
hub / github.com/Doorman11991/smallcode / recordWrite

Method recordWrite

src/tools/read_tracker.js:62–68  ·  view source on GitHub ↗

Mark a path as written (so write→write doesn't trigger guard).

(filePath, cwd)

Source from the content-addressed store, hash-verified

60
61 /** Mark a path as written (so write→write doesn't trigger guard). */
62 recordWrite(filePath, cwd) {
63 if (this.disabled) return;
64 const c = this._canon(filePath, cwd);
65 if (!c) return;
66 this.writtenPaths.add(c);
67 this.readPaths.add(c); // we know its content because we just wrote it
68 }
69
70 /**
71 * Check whether a write should be guarded. Returns:

Callers 1

checkWriteMethod · 0.95

Calls 2

_canonMethod · 0.95
addMethod · 0.80

Tested by

no test coverage detected