(path: string)
| 68 | function 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 | }, |
nothing calls this directly
no test coverage detected
searching dependent graphs…