MCPcopy Create free account
hub / github.com/arktypeio/arktype / writeChanged

Function writeChanged

ark/aot/nextProgram.ts:186–189  ·  view source on GitHub ↗
(path: string, text: string)

Source from the content-addressed store, hash-verified

184
185// left as it is where unchanged, so Turbopack's cache keeps what read it
186const writeChanged = (path: string, text: string) => {
187 if (existsSync(path) && readFileSync(path, "utf8") === text) return
188 writeFileSync(path, text)
189}
190
191// what an earlier build's read wrote that this one's doesn't
192const removeAllBut = (dir: string, kept: Set<string>) => {

Callers 2

readProgramFunction · 0.85
readAndWriteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected