MCPcopy Index your code
hub / github.com/angular/angular-cli / prependToFile

Function prependToFile

tests/e2e/utils/fs.ts:73–77  ·  view source on GitHub ↗
(filePath: string, text: string, options?: any)

Source from the content-addressed store, hash-verified

71}
72
73export function prependToFile(filePath: string, text: string, options?: any) {
74 return readFile(filePath).then((content: string) =>
75 writeFile(filePath, text.concat(content), options),
76 );
77}
78
79export async function expectFileMatchToExist(dir: string, regex: RegExp): Promise<string> {
80 const files = await fs.readdir(dir);

Calls 2

readFileFunction · 0.70
writeFileFunction · 0.70

Tested by

no test coverage detected