MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / appendToFile

Method appendToFile

src/utils/sessionStorage.ts:648–657  ·  view source on GitHub ↗
(filePath: string, data: string)

Source from the content-addressed store, hash-verified

646 }
647
648 private async appendToFile(filePath: string, data: string): Promise<void> {
649 try {
650 await fsAppendFile(filePath, data, { mode: 0o600 })
651 } catch {
652 // Directory may not exist — some NFS-like filesystems return
653 // unexpected error codes, so don't discriminate on code.
654 await mkdir(dirname(filePath), { recursive: true, mode: 0o700 })
655 await fsAppendFile(filePath, data, { mode: 0o600 })
656 }
657 }
658
659 private async drainWriteQueue(): Promise<void> {
660 for (const [filePath, queue] of this.writeQueues) {

Callers 1

drainWriteQueueMethod · 0.95

Calls 1

mkdirFunction · 0.85

Tested by

no test coverage detected