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

Method appendToFile

source code/utils/sessionStorage.ts:636–645  ·  view source on GitHub ↗
(filePath: string, data: string)

Source from the content-addressed store, hash-verified

634 }
635
636 private async appendToFile(filePath: string, data: string): Promise<void> {
637 try {
638 await fsAppendFile(filePath, data, { mode: 0o600 })
639 } catch {
640 // Directory may not exist — some NFS-like filesystems return
641 // unexpected error codes, so don't discriminate on code.
642 await mkdir(dirname(filePath), { recursive: true, mode: 0o700 })
643 await fsAppendFile(filePath, data, { mode: 0o600 })
644 }
645 }
646
647 private async drainWriteQueue(): Promise<void> {
648 for (const [filePath, queue] of this.writeQueues) {

Callers 1

drainWriteQueueMethod · 0.95

Calls 1

mkdirFunction · 0.85

Tested by

no test coverage detected