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

Method appendToFile

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

Source from the content-addressed store, hash-verified

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

Callers 1

drainWriteQueueMethod · 0.95

Calls 1

mkdirFunction · 0.85

Tested by

no test coverage detected