MCPcopy
hub / github.com/angular/angular / readFile

Function readFile

packages/core/schematics/utils/project_tsconfig_paths.ts:70–77  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

68function createHost(tree: Tree): workspaces.WorkspaceHost {
69 return {
70 async readFile(path: string): Promise<string> {
71 const data = tree.read(path) as unknown as virtualFs.FileBuffer;
72 if (!data) {
73 throw new Error('File not found.');
74 }
75
76 return virtualFs.fileBufferToString(data);
77 },
78 async writeFile(path: string, data: string): Promise<void> {
79 return tree.overwrite(path, data);
80 },

Callers

nothing calls this directly

Calls 1

readMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…