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

Function writeFileForSync

source code/services/settingsSync/index.ts:463–480  ·  view source on GitHub ↗
(
  filePath: string,
  content: string,
)

Source from the content-addressed store, hash-verified

461}
462
463async function writeFileForSync(
464 filePath: string,
465 content: string,
466): Promise<boolean> {
467 try {
468 const parentDir = dirname(filePath)
469 if (parentDir) {
470 await mkdir(parentDir, { recursive: true })
471 }
472
473 await writeFile(filePath, content, 'utf8')
474 logForDiagnosticsNoPII('info', 'settings_sync_file_written')
475 return true
476 } catch {
477 logForDiagnosticsNoPII('warn', 'settings_sync_file_write_failed')
478 return false
479 }
480}
481
482/**
483 * Apply remote entries to local files (CCR pull pattern).

Callers 1

Calls 2

mkdirFunction · 0.85
logForDiagnosticsNoPIIFunction · 0.85

Tested by

no test coverage detected