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

Function writeFileForSync

src/services/settingsSync/index.ts:461–478  ·  view source on GitHub ↗
(
  filePath: string,
  content: string,
)

Source from the content-addressed store, hash-verified

459}
460
461async function writeFileForSync(
462 filePath: string,
463 content: string,
464): Promise<boolean> {
465 try {
466 const parentDir = dirname(filePath)
467 if (parentDir) {
468 await mkdir(parentDir, { recursive: true })
469 }
470
471 await writeFile(filePath, content, 'utf8')
472 logForDiagnosticsNoPII('info', 'settings_sync_file_written')
473 return true
474 } catch {
475 logForDiagnosticsNoPII('warn', 'settings_sync_file_write_failed')
476 return false
477 }
478}
479
480/**
481 * 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