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

Function readFileLines

source code/utils/shellConfig.ts:83–93  ·  view source on GitHub ↗
(
  filePath: string,
)

Source from the content-addressed store, hash-verified

81 * Returns null if file doesn't exist or can't be read
82 */
83export async function readFileLines(
84 filePath: string,
85): Promise<string[] | null> {
86 try {
87 const content = await readFile(filePath, { encoding: 'utf8' })
88 return content.split('\n')
89 } catch (e: unknown) {
90 if (isFsInaccessible(e)) return null
91 throw e
92 }
93}
94
95/**
96 * Write lines back to a file

Callers 3

findClaudeAliasFunction · 0.85
cleanupShellAliasesFunction · 0.85

Calls 2

readFileFunction · 0.85
isFsInaccessibleFunction · 0.85

Tested by

no test coverage detected