MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / readSync

Function readSync

source code/utils/fsOperations.ts:457–468  ·  view source on GitHub ↗
(fsPath, options)

Source from the content-addressed store, hash-verified

455 },
456
457 readSync(fsPath, options) {
458 using _ = slowLogging`fs.readSync(${fsPath}, ${options.length} bytes)`
459 let fd: number | undefined = undefined
460 try {
461 fd = fs.openSync(fsPath, 'r')
462 const buffer = Buffer.alloc(options.length)
463 const bytesRead = fs.readSync(fd, buffer, 0, options.length, 0)
464 return { buffer, bytesRead }
465 } finally {
466 if (fd) fs.closeSync(fd)
467 }
468 },
469
470 appendFileSync(path, data, options) {
471 using _ = slowLogging`fs.appendFileSync(${path}, ${data.length} chars)`

Callers 2

readFileTailSyncFunction · 0.90
drainStdinFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected