MCPcopy
hub / github.com/codeaashu/claude-code / readSync

Function readSync

src/utils/fsOperations.ts:455–466  ·  view source on GitHub ↗
(fsPath, options)

Source from the content-addressed store, hash-verified

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