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

Function writeFileLines

source code/utils/shellConfig.ts:98–109  ·  view source on GitHub ↗
(
  filePath: string,
  lines: string[],
)

Source from the content-addressed store, hash-verified

96 * Write lines back to a file
97 */
98export async function writeFileLines(
99 filePath: string,
100 lines: string[],
101): Promise<void> {
102 const fh = await open(filePath, 'w')
103 try {
104 await fh.writeFile(lines.join('\n'), { encoding: 'utf8' })
105 await fh.datasync()
106 } finally {
107 await fh.close()
108 }
109}
110
111/**
112 * 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