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

Function writeFileLines

src/utils/shellConfig.ts:96–107  ·  view source on GitHub ↗
(
  filePath: string,
  lines: string[],
)

Source from the content-addressed store, hash-verified

94 * Write lines back to a file
95 */
96export async function writeFileLines(
97 filePath: string,
98 lines: string[],
99): Promise<void> {
100 const fh = await open(filePath, 'w')
101 try {
102 await fh.writeFile(lines.join('\n'), { encoding: 'utf8' })
103 await fh.datasync()
104 } finally {
105 await fh.close()
106 }
107}
108
109/**
110 * Check if a claude alias exists in any shell config file

Callers 2

cleanupShellAliasesFunction · 0.85

Calls 2

openFunction · 0.85
closeMethod · 0.45

Tested by

no test coverage detected